/// <summary> /// コンストラクタ /// </summary> /// <param name="playing"></param> public NetworkPlayStartState(NetworkPlayingState playing, IMainGameHub impl, GameStartRequest reqeust) { // Exitで渡すため this.playing = playing; toServerImpl = impl; startRequest = reqeust; }
/// <summary> /// Game Start /// </summary> private void prepareGameStart(GameReadyResponse response) { foreach (var key in response.PlayerBoards.Keys) { bool isMine = loopParam.MineId == key; PlayerInfo info = isMine ? playerInfo[MINE_IDX] : playerInfo[ENEMY_IDX]; var playing = new NetworkPlayingState(info.Viewer, isMine); info.SetPlayState(playing); NetworkPlayStartState start = new NetworkPlayStartState(playing, ServerImpl, new GameStartRequest { Id = key, RoomName = loopParam.RoomName }); info.Ctrl.ReserveAddState(start); } }
/// <summary> /// PlayingState設定 /// </summary> /// <param name="state"></param> public void SetPlayState(NetworkPlayingState state) { PlayState = state; }