Esempio n. 1
0
 public override void GameStop()
 {
     Current = State.LOSE;
     GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
     GUIPanelManager.Get(PanelType.Lose).Show();
     GUIPanelManager.currentPanel = PanelType.Lose;
 }
Esempio n. 2
0
 public override void Initialize()
 {
     Current = State.LOAD;
     GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
     GUIPanelManager.Get(PanelType.MainMenu).Show();
     GUIPanelManager.currentPanel = PanelType.MainMenu;
 }
Esempio n. 3
0
 void OnGUI()
 {
     if (currentState == State.LOAD && GUIPanelManager.currentPanel == PanelType.MainMenu)
     {
         if (GUI.Button(new Rect(0, Screen.height * .2f, Screen.width, Screen.height * .6f), "", GUIStyle.none))
         {
             Player.isStop = false;
             SetState(State.GAME);
             GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
             GUIPanelManager.Get(PanelType.GameMenu).Show();
             GUIPanelManager.currentPanel = PanelType.GameMenu;
             Game.GameStart();
         }
     }
 }
Esempio n. 4
0
        void OnClick()
        {
            switch (action)
            {
            case GUIAction.Pause:
                Player.isStop = true;
                Game.GamePause();
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Missions).Show();
                GUIPanelManager.Get(PanelType.Missions).Adjust();
                GUIPanelManager.currentPanel = PanelType.Missions;
                break;

            case GUIAction.Settings:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Settings).Show();
                GUIPanelManager.currentPanel = PanelType.Settings;
                break;

            case GUIAction.Missions:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Missions).Show();
                GUIPanelManager.Get(PanelType.Missions).Adjust();
                GUIPanelManager.currentPanel = PanelType.Missions;
                break;

            case GUIAction.Leaderboard:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Leaderboard).Show();
                GUIPanelManager.currentPanel = PanelType.Leaderboard;
                break;

            case GUIAction.Characters:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Character).Show();
                GUIPanelManager.currentPanel = PanelType.Character;
                break;

            case GUIAction.Shop:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.Shop).Show();
                GUIPanelManager.currentPanel = PanelType.Shop;
                break;

            case GUIAction.Resume:
                Player.isStop = false;
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.GameMenu).Show();
                GUIPanelManager.currentPanel = PanelType.GameMenu;
                break;

            case GUIAction.Credits:
                break;

            case GUIAction.Home:
                if (States.Current != State.LOAD)
                {
                    Game.GameRestart();
                }
                break;

            case GUIAction.Back:
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.MainMenu).Show();
                GUIPanelManager.currentPanel = PanelType.MainMenu;
                break;

            case GUIAction.Revive:
                States.Current = State.GAME;
                Player.Revive();
                GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
                GUIPanelManager.Get(PanelType.GameMenu).Show();
                GUIPanelManager.currentPanel = PanelType.GameMenu;
                break;
            }
        }