public void EndGame(EGryll Winner) { MainCamera.clearFlags = CameraClearFlags.Nothing; MainCamera.depth = 5; SpriteRenderer renderer = SpriteScreen.GetComponent<SpriteRenderer> (); renderer.sprite = WinScreens [(int)Winner]; renderer.enabled = true; GameView = EGameView.End; InputMgr.bAllowGameInput = false; bGameStarted = false; }
public void BeginGame() { if (!bGameStarted) { GameView = EGameView.Game; Settings.SetActive(false); Start.SetActive(true); bInSettings = false; foreach (MeshRenderer m in Start.GetComponentsInChildren<MeshRenderer>()) { m.enabled = false; } SpriteScreen.GetComponent<SpriteRenderer> ().sprite = CharacterScreen; StartColor = SpriteScreen.GetComponent<SpriteRenderer>().color; EndColor = new Color (StartColor.r, StartColor.g, StartColor.b, 0); StartCoroutine ("DelayFadeStart"); StartCoroutine ("DelayGameStart"); } }
public void OpenMenu() { MainCamera.clearFlags = CameraClearFlags.SolidColor; MainCamera.depth = -5; ResetGame (); foreach (MeshRenderer m in Start.GetComponentsInChildren<MeshRenderer>()) { m.enabled = true; } GameView = EGameView.Menu; SpriteScreen.GetComponent<SpriteRenderer> ().sprite = StartScreen; }
void OnEnable() { ins = this; LevelMgr = gameObject.GetComponent<LevelManager> (); PlayerMgr = gameObject.GetComponent<PlayerManager> (); InputMgr = gameObject.GetComponent<InputManager> (); GameView = EGameView.Menu; bGameStarted = false; MainCamera.clearFlags = CameraClearFlags.Nothing; MainCamera.depth = 5; CurrentSetting = EditSettings.MODE; }