コード例 #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="playing"></param>
        public NetworkPlayStartState(NetworkPlayingState playing, IMainGameHub impl, GameStartRequest reqeust)
        {   // Exitで渡すため
            this.playing = playing;

            toServerImpl = impl;
            startRequest = reqeust;
        }
コード例 #2
0
        /// <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);
            }
        }
コード例 #3
0
 /// <summary>
 /// PlayingState設定
 /// </summary>
 /// <param name="state"></param>
 public void SetPlayState(NetworkPlayingState state)
 {
     PlayState = state;
 }