//----------------------------------------------------------------------------------------------------------

        #region Constructor

        protected BaseBattleState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters,
                                  Observer gameEvents)
        {
            Fsm            = fsm;
            GameData       = gameData;
            GameParameters = gameParameters;
            GameEvents     = gameEvents;

            //Subscribe game events
            GameEvents.AddListener(this);
            IsInitialized = true;
        }
示例#2
0
 void Subscribe() => GameEvents.AddListener(this);