private void UpdateData() { Units player = PlayerControlMgr.Instance.GetPlayer(); if (player == null) { return; } if (LevelManager.Instance.IsPvpBattleType) { PvpStatisticMgr.GroupData groupData = Singleton <PvpManager> .Instance.StatisticMgr.GetGroupData(0); PvpStatisticMgr.GroupData groupData2 = Singleton <PvpManager> .Instance.StatisticMgr.GetGroupData(1); this._data.lm_kill = groupData.TeamKill; this._data.lm_lv = groupData.TeamLv; this._data.lm_ExpRatio = groupData.TeamExpRatio; this._data.bl_kill = groupData2.TeamKill; this._data.bl_lv = groupData2.TeamLv; this._data.bl_ExpRatio = groupData2.TeamExpRatio; } else { this._data.lm_kill = AttachedPropertyMediator.GetTotalHeroKill(TeamType.LM); this._data.bl_kill = AttachedPropertyMediator.GetTotalHeroKill(TeamType.BL); this._data.lm_lv = BattleAttrManager.Instance.LMAttrVale.TeamLevel; this._data.bl_lv = BattleAttrManager.Instance.BLAttrValue.TeamLevel; } }
public void SetKill(int kill) { AttachedPropertyMediator mediator = Singleton <AttachedPropertyView> .Instance.Mediator; if (mediator != null) { mediator.SetTeamKill(this.isPlayer, kill); } }
public void DoAnimation(int levelChange, int orginLevel, float originRate, float curRate) { AttachedPropertyMediator mediator = Singleton <AttachedPropertyView> .Instance.Mediator; if (mediator != null) { mediator.StartAnimateDate(levelChange, orginLevel, originRate, curRate, this.isPlayer, this.MAX_LEVEL); } }
public override void Init() { base.Init(); this.mediator = this.gameObject.GetComponent <AttachedPropertyMediator>(); if (this.mediator == null) { ClientLogger.Error("no mediator to get!"); } BattleAttrManager.Instance.Init(); }
public void Start() { AttachedPropertyMediator.Instance = this; if (LevelManager.CurBattleType == 11) { this.SetType(2); } else { this.SetType(1); } this._data = new AttachedPropertyMediator.GroupData(); this.SetMyForePercent(0f); this.SetEnemyForePercent(0f); this.SetMyTeamLv(1); this.SetEnemyTeamLv(1); this.SetTeamKill(true, 0); this.SetTeamKill(false, 0); }