void OnGetAreanSelf(SocketModel module){ var areanMng = MonoInstancePool.getInstance<AreanManager>(); MsgArenaInfoRep msg = MsgSerializer.Deserialize<MsgArenaInfoRep>(module); areanMng.areanUserInfo.index = msg.rank; areanMng.areanUserInfo.hIndex = msg.hrank; areanMng.areanUserInfo.coin = msg.arenaCoin; areanMng.areanUserInfo.fightCount = msg.count; areanMng.areanUserInfo.buyCount = msg.buyCount; areanMng.areanUserInfo.countCdTime = msg.countTime; areanMng.areanUserInfo.modified = true; List<ArenaRecord> records = msg.record; for(int i = 0 ; i < records.Count ; i++){ var data = new AreanRecordData(); data.uid = records[i].uid; data.type = records[i].type; data.rankIndex = records[i].rank; data.result = records[i].result; data.time = records[i].time; areanMng.AddRecordData(data); } MonoInstancePool.getInstance<SendAreanHandler>().SendAreanRankListReq(); }
public void InsertRecordData(AreanRecordData recordData){ areanRankList.Insert(0 , recordData); }
public void AddRecordData(AreanRecordData recordData){ areanRecordList.Add(recordData); }
void OnDestory(){ this.recordData = null; }
public void BindingData(AreanRecordData data){ this.recordData = data; }
void OnGetFightRecord(SocketModel module){ MsgArenaFightInfoRep msg = MsgSerializer.Deserialize<MsgArenaFightInfoRep>(module); var areanMng = MonoInstancePool.getInstance<AreanManager>(); ArenaRecord record = msg.record; var data = new AreanRecordData(); data.uid = record.uid; data.type = record.type; data.rankIndex = record.rank; data.result = record.result; areanMng.InsertRecordData(data); }