private void OnReq_BattleCheck(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); ReqBattleCheck req = Serializer.Deserialize <ReqBattleCheck>(ms); AckBattleCheck ack = new AckBattleCheck(); ack.CopyType = req.CopyType; ack.Chapter = req.Chapter; ack.CopyID = req.CopyID; NetworkManager.Instance.Send(MessageID.MSG_ACK_BATTLE_CHECK, ack, 0, 0); }
private void OnAck_BattleCheck(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); AckBattleCheck ack = Serializer.Deserialize <AckBattleCheck>(ms); GTEventCenter.FireEvent(GTEventID.TYPE_BATTLE_CHECK); DCopy db = ReadCfgCopy.GetDataById(ack.CopyID); LVL.LevelData.CopyID = ack.CopyID; LVL.LevelData.Chapter = ack.Chapter; LVL.LevelData.CopyType = (ECopyType)ack.CopyType; LVL.LevelData.SceneID = db.SceneId; LVL.LevelData.Win = false; LVL.LevelData.Star = 0; GTLauncher.Instance.LoadScene(db.SceneId); }