public GameBoardManager() { Channel = SceneTransporter.CurrentChannel; Channel.GameEvent += DestoryNullReference; NetworkManager = new NetworkManager(this, Channel); Handlers = new Dictionary <GameManagerState, List <GameBoardStateHandler> > { { GameManagerState.ActionPhaseIdle, new List <GameBoardStateHandler> { new ActionPhaseIdleStateHandler(this) } }, { GameManagerState.ActionPhaseInternalQuery, new List <GameBoardStateHandler> { new ActionPhaseInternalQueryHandler(this) } }, { GameManagerState.ActionPhaseChooseTarget, new List <GameBoardStateHandler> { new ActionPhaseChooseTargetStateHandler(this) } }, { GameManagerState.OutOfMyTurn, new List <GameBoardStateHandler> { new OutOfMyTurnStateHandler(this) } } }; }
public NetworkManager(GameBoardManager manager, GameEventChannel channel) { Manager = manager; this.Channel = channel; Channel.GameEvent += OnSubscribedGameEvents; }