public bool WaitForResourcesLoaded(bool Wait) { if (_resourcesLoaded) return true; return ResourcesLoadedEvent.WaitOne(Wait ? Timeout.Infinite : 0); }
public static void WaitForNavigator(CLRScriptBase script, Navigator nav) { if (nav.WaitForResourcesLoaded(false) == true) { DrawNavigatorCategory(script, nav.bottomCategory); return; } else { script.SendMessageToPC(script.OBJECT_SELF, "loading..."); script.DelayCommand(0.5f, delegate() { WaitForNavigator(script, nav); }); return; } }