public void RefreshItem() { winIcon.gameObject.SetActive(info.matchSide == info.winners); failIcon.gameObject.SetActive(info.matchSide != info.winners); deathCountText.text = string.Format("{0}/{1}", info.killQuantity, info.dieQuantity); battleModeText.text = GetBattleMode(info.battleType); battleScoreText.text = info.resouce.ToString(); dateText.text = GetDateString(info.battleStartDate); if (!string.IsNullOrEmpty(info.portrait)) { Resource.GameResourceLoadManager.GetInstance().LoadAtlasSprite(info.portrait, delegate(string name, AtlasSprite atlasSprite, System.Object param) { playerIcon.SetSprite(atlasSprite); }, true); } for (int i = 0; i < unitIconArray.Length; i++) { if (unitsProtoData.Find(p => p.ID == info.unitId[i]) == null) { return; } int icon = unitsProtoData.Find(p => p.ID == info.unitId[i]).Icon; Image unitIcon = unitIconArray[i]; if (icon != 0) { Resource.GameResourceLoadManager.GetInstance().LoadAtlasSprite(icon, delegate(string name, AtlasSprite atlasSprite, System.Object param) { unitIcon.SetSprite(atlasSprite); }, true); } } isHaveBattleInfoInLocal = false; long[] localBattleid = PlayBackManager.GetInstance().GetBattleIdsFromPlaybackLocalCache(); for (int i = 0; i < localBattleid.Length; i++) { if (info.battleId == localBattleid[i]) { isHaveBattleInfoInLocal = true; break; } } if (isHaveBattleInfoInLocal) { playBackButton.gameObject.SetActive(true); } else { playBackButton.gameObject.SetActive(false); } }
public void RequsetPlayBackData() { long battleId = DataManager.GetInstance().GetBattleId(); DebugUtils.Log(DebugUtils.Type.Playback, string.Format("Request playback data battleId = {0}", battleId)); //PlaybackC2S message = new PlaybackC2S(); //message.battleId = battleId; //byte[] data = ProtobufUtils.Serialize( message ); //NetworkManager.SendRequest( ServerType.BattleServer, MsgCode.PlayBackMessage, data ); PlayBackManager.GetInstance().DownloadPlaybackData(battleId); }
public void EnterMainMenu() { PlayBackManager.GetInstance().QuitPlaybattleBack(); }
private void ClickPlayBackButton() { //TODO : PlayBack PlayBackManager.GetInstance().PlayBattleBack(info.battleId); }