private void LeaveRoom() { if (isShowGuide) { StopGuide(); } FightLeaveDTO leaveDTO = new FightLeaveDTO(); leaveDTO.Roomid = RoomData.room.Roomid; leaveDTO.Seat = RoomData.seat; this.WriteMessage((int)MsgTypes.TypeFight, (int)FightTypes.LaeveCreq, leaveDTO.ToByteArray()); }
public void AddDeath(int seat, int bounces) { Death death; death.seat = seat; death.bounces = bounces; death.time = gameTime; death.light = lights.Count; deaths.Add(death); if (isShowRank) { return; } if (RoomData.isMainRole(seat)) { isShowRank = true; RoomData.isDeath = true; FrameActions.instance.needAdd = false; FightLeaveDTO leaveDTO = new FightLeaveDTO(); leaveDTO.Roomid = RoomData.room.Roomid; leaveDTO.Seat = RoomData.seat; this.WriteMessage((int)MsgTypes.TypeFight, (int)FightTypes.DeathCreq, leaveDTO.ToByteArray()); } if (isEnd) { if (isInDeath(RoomData.seat)) { ShowOtherList(); } else { beforeShow(); ShowFirstList(); } } else { if (RoomData.isMainRole(seat)) { ShowOtherList(); } } }