示例#1
0
    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;
    }
示例#2
0
    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");
        }
    }
示例#3
0
 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;
 }
示例#4
0
    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;
    }