public BattleRecord() { recordList = new List<IBattleViewRecord>(); toReportRecordList = new List<IBattleViewRecord>(); errorRecord = new BattleErrorRecord(); }
public virtual void addErrorInfo(int errorType, string error) { if (errorRecord == null) { errorRecord = new BattleErrorRecord(); } this.errorRecord.addErrorString(errorType, error); }
/// <summary> /// 每次给客户端汇报时清除 /// </summary> public virtual void clearError() { this.errorRecord = null; }
public void showBattleErrorRecord(BattleErrorRecord battleErrorRecord) { Logger.LogWarning("I got an error."); foreach (var error in battleErrorRecord.ErrorList) { if (error.ErrorType == BattleRecordConstants.BATTLE_ERROR_HERO_COLER_INDEX) { PopTextManager.PopTip("Hero color selected index error between client and server."); } else if (error.ErrorType == BattleRecordConstants.BATTLE_ERROR_TARGET) { PopTextManager.PopTip("Monster target index error between client and server."); } else { PopTextManager.PopTip("Undefined error."); } } recordIndex++; DealWithRecord(); }