Beispiel #1
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        protected BaseBattleState(TurnBasedFsm fsm, IGameData gameData, Battle.Configurations.Configurations configurations)
        {
            Fsm            = fsm;
            GameData       = gameData;
            Configurations = configurations;

            //Subscribe game events
            GameEvents.Instance.AddListener(this);
            IsInitialized = true;
        }
Beispiel #2
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        protected TurnState(TurnBasedFsm fsm, IGameData gameData, Battle.Configurations.Configurations configurations) : base(fsm, gameData,
                                                                                                                              configurations)
        {
            var game = GameData.RuntimeGame;

            //get player according to the seat
            Player = game.TurnLogic.GetPlayer(Seat);

            //register turn state
            Fsm.RegisterPlayerState(Player, this);
        }
Beispiel #3
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        public EndBattleState(TurnBasedFsm fsm, IGameData gameData, Battle.Configurations.Configurations configurations) : base(fsm, gameData,
                                                                                                                                configurations)
        {
        }
Beispiel #4
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        public BottomPlayerState(TurnBasedFsm fsm, IGameData gameData, Battle.Configurations.Configurations configurations) : base(fsm, gameData, configurations)
        {
        }
Beispiel #5
0
 public void StartBattle()
 {
     TurnBasedLogic = new TurnBasedFsm(this, Data, configurations);
     TurnBasedLogic.StartBattle();
 }
Beispiel #6
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        protected AiTurnState(TurnBasedFsm fsm, IGameData gameData, Battle.Configurations.Configurations configurations) : base(fsm, gameData,
                                                                                                                                configurations)
        {
            AiModule = new AiModule(Player, GameData.RuntimeGame);
        }
Beispiel #7
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        public TopPlayerState(TurnBasedFsm fsm, IGameData gameData, Configurations configurations) : base(fsm, gameData,
                                                                                                          configurations)
        {
        }