private void OnLevelWasLoaded() { GameObject obj = new GameObject(); btCameraFade fadeScript = obj.AddComponent <btCameraFade>(); fadeScript.FadeIn(1.0f); GameObject.Destroy(obj, 1.0f); this.CreateUserInterface(); // Destroy the editor helper grid GameObject gridObj = GameObject.Find("HelperGrid10x10"); GameObject.Destroy(gridObj); GameObject.Destroy(this.gameObject); }
public void BeginLevelLoad(int _levelToLoad) { if (this.loadingLevel == true) { return; } this.loadingLevel = true; this.levelToLoad = _levelToLoad; // Create a new camera fade and wait for it to complete GameObject newObj = new GameObject(); this.cameraFade = newObj.AddComponent <btCameraFade>(); this.cameraFade.FadeOut(1.0f); // Disable all of the buttons this.ToggleMenuButtons(false); }