コード例 #1
0
ファイル: StateManager.cs プロジェクト: dozzzl/Zombie
 public override void GameStop()
 {
     Current = State.LOSE;
     GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
     GUIPanelManager.Get(PanelType.Lose).Show();
     GUIPanelManager.currentPanel = PanelType.Lose;
 }
コード例 #2
0
ファイル: StateManager.cs プロジェクト: dozzzl/Zombie
 public override void Initialize()
 {
     Current = State.LOAD;
     GUIPanelManager.Get(GUIPanelManager.currentPanel).Hide();
     GUIPanelManager.Get(PanelType.MainMenu).Show();
     GUIPanelManager.currentPanel = PanelType.MainMenu;
 }
コード例 #3
0
ファイル: StateManager.cs プロジェクト: dozzzl/Zombie
 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();
         }
     }
 }
コード例 #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;
            }
        }