public override void ReadImplement() { int roomId = ReadInt(); roomName = ReadString(23); mapId = ReadShort(); stage4vs4 = ReadByte(); byte type = ReadByte(); stageType = (RoomTypeEnum)type; state = (RoomStateEnum)ReadByte(); players = ReadByte(); slots = ReadByte(); ping = ReadByte(); weaponsFlag = ReadByte(); //RoomWeaponsFlag È um Enum randomMap = ReadByte(); //0=DESATIVADO 2=ATIVADO modeSpecial = (RoomModeSpecial)ReadByte(); //2=DINO 3=SHOTGUN 4=SNIPER 6=CHALLENGE NORMAL 7=HEADHUNTER 8=CHALLENGE KNIFE 9=ZOMBIE 10=CHAOS (MODO PORRADA NAO É MODO SPECIAL=0) leaderName = ReadString(33); killTime = ReadInt(); limit = ReadByte(); //BLOQUEAR A ENTRADA QUANDO A PARTIDA ESTIVER EM ANDAMENTO(JOGANDO) seeConf = ReadByte(); //[MIN 0 MAX 30] 0=DESATIVADO 1=TERCEIRA PESSOA 2=CAMERA LIVRE 4=VISUALIZAR TIME ADVERSÁRIO 8=VER HP DO INIMIGO 16=DESATIVAR O USO DA VISÃO DE TERCEIRA PESSOA balancing = ReadShort(); password = ReadString(4); IsSpecialMode = modeSpecial == RoomModeSpecial.CHALLENGE_NORMAL || modeSpecial == RoomModeSpecial.CHALLENGE_KNIFE || modeSpecial == RoomModeSpecial.ZOMBIE; if (IsSpecialMode) { aiCount = ReadByte(); aiLevel = ReadByte(); } Logger.DebugPacket(GetType().Name, $"RoomId: {roomId} RoomName: {roomName} MapId: {mapId} Stage4vs4: {stage4vs4} StageType: {stageType} Type: {type} State: {state} Players: {players} Slots: {slots} Ping: {ping} WeaponsFlag: {weaponsFlag} RandomMap: {randomMap} ModeSpecial: {modeSpecial} KillTime: {killTime} Limit: {limit} SeeConf: {seeConf} Balancing: {balancing} AiCount: {aiCount} AiLevel: {aiLevel}"); }
/// 状态切换 private void changeState(RoomStateEnum stateEnum) { this.stateEnum = stateEnum; switch (stateEnum) { case RoomStateEnum.Ready: break; case RoomStateEnum.Start: sendCardControl.InitDeskCard(() => { CoroutineManager.Instance.StartCoroutineWait(0.3f, () => { changeState(RoomStateEnum.Send); }); }); break; case RoomStateEnum.Send: sendCardControl.StartGameSendCard(); changeState(RoomStateEnum.Playing); break; case RoomStateEnum.Playing: if (curRoundPlayer == null) { curRoundPlayer = PlayerManager.Instance.PlayerSelf; } break; } for (int i = 0; i < roomPlayers.Count; ++i) { roomPlayers[i].SetRoomState(stateEnum); } }
public Room(int id, string name, string password, int maxPlayers, RoomStateEnum state, RankEnum minRank, RoomModeListEnum mode) { Id = id; Name = name; Password = password; MaxPlayers = maxPlayers; State = state; MinRank = minRank; Mode = mode; }
public void Init() { roomPlayers = new List <PlayerControl>(RoomManager.RoomMaxPlayer); stateEnum = RoomStateEnum.Ready; sendCardControl = new SendCardControl(); sendCardControl.Init(this); mRoomData = new RoomData(); SignalManager.Instance.Create <FlipCardSignal>().AddListener(onFlipCard); SignalManager.Instance.Create <CompleteBidSignal>().AddListener(onCompleteBid); SignalManager.Instance.Create <SelectSelfCardSignal>().AddListener(onSelectSelfCard); }
public override void ReadImplement() { roomId = ReadInt(); roomName = ReadString(23); mapId = ReadShort(); stage4vs4 = ReadByte(); stageType = (RoomTypeEnum)ReadByte(); state = (RoomStateEnum)ReadByte(); players = ReadByte(); slots = ReadByte(); ping = ReadByte(); weaponsFlag = ReadByte(); randomMap = ReadByte(); modeSpecial = (RoomModeSpecial)ReadByte(); aiCount = ReadByte(); aiLevel = ReadByte(); }
/// 当前房间状态 public void SetRoomState(RoomStateEnum stateEnum) { btnReady.gameObject.SetActive(stateEnum == RoomStateEnum.Ready); }
public RoomState(RoomStateEnum state, Position position) { State = state; Position = position; }
public void SetRoomState(RoomStateEnum stateEnum) { GetPlayerItem().SetRoomState(stateEnum); }