Exemple #1
0
        public void SwitchGameMode(SwitchGameModeEventArgs e)
        {
            OnSwitchingGameMode(e);
            OnSwitchedGameMode(e);

            CurrentGameMode = e.EnterMode;
        }
Exemple #2
0
 private void Awake()
 {
     enterNormal = new SwitchGameModeEventArgs(
         GameModeTag.StartMode, GameModeTag.NormalMode);
     enterBuildSkill = new SwitchGameModeEventArgs(
         GameModeTag.StartMode, GameModeTag.BuildSkillMode);
 }
Exemple #3
0
 private void Awake()
 {
     endTurn = new SwitchGameModeEventArgs(
         GameModeTag.NormalMode, GameModeTag.INVALID);
     startTurn = new SwitchGameModeEventArgs(
         GameModeTag.INVALID, GameModeTag.NormalMode);
 }
Exemple #4
0
        private void LogMode_PlayerInputting(object sender,
                                             PlayerInputEventArgs e)
        {
            SwitchGameModeEventArgs sgme;

            if (EnterLogMode(e))
            {
                sgme = new SwitchGameModeEventArgs(
                    GameModeTag.NormalMode, GameModeTag.LogMode);
                GetComponent <GameModeManager>().SwitchGameMode(sgme);
            }
            else if (LeaveLogMode(e))
            {
                sgme = new SwitchGameModeEventArgs(
                    GameModeTag.LogMode, GameModeTag.NormalMode);
                GetComponent <GameModeManager>().SwitchGameMode(sgme);
            }
        }
Exemple #5
0
 protected virtual void OnSwitchingGameMode(SwitchGameModeEventArgs e)
 {
     SwitchingGameMode?.Invoke(this, e);
 }
Exemple #6
0
 private void Awake()
 {
     leaveBuild = new SwitchGameModeEventArgs(
         GameModeTag.BuildSkillMode, GameModeTag.StartMode);
 }