public void RefreshUI(EntitySelf self) { this.Awake(); this.TextAtk.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.Atk, RoleAttrTool.GetAtk(self), "ff7d4b")); this.TextDefence.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.Defence, RoleAttrTool.GetDefence(self), "ff7d4b")); this.TextHpLmt.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HpLmt, RoleAttrTool.GetHpLmt(self), "ff7d4b")); this.TextHurtAddRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HurtAddRatio, self.HurtAddRatio, "ff7d4b")); this.TextHurtDeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HurtDeRatio, self.HurtDeRatio, "ff7d4b")); this.TextHitRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HitRatio, self.HitRatio, "ff7d4b")); this.TextDodgeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DodgeRatio, self.DodgeRatio, "ff7d4b")); this.TextCritRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.CritRatio, self.CritRatio, "ff7d4b")); this.TextCritHurtAddRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.CritAddValue, self.CritAddValue, "ff7d4b")); this.TextParryRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.ParryRatio, self.ParryRatio, "ff7d4b")); this.TextParryHurtDeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.ParryHurtDeRatio, self.ParryHurtDeRatio, "ff7d4b")); this.TextDeparryRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DeparryRatio, self.DeparryRatio, "ff7d4b")); this.TextDecritRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DecritRatio, self.DecritRatio, "ff7d4b")); this.TextMoveSpeed.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.MoveSpeed, self.MoveSpeed, "ff7d4b")); this.TextHpRestore.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HpRestore, self.HpRestore, "ff7d4b")); this.TextLV.set_text("Lv" + self.Lv); this.TextExp.set_text(Utils.SwitchChineseNumber(self.Exp, 0) + "/" + Utils.SwitchChineseNumber(self.ExpLmt, 0)); float x; if (self.ExpLmt == 0L) { x = 0f; } else { x = 375f * ((float)self.Exp / (float)self.ExpLmt); } Vector2 sizeDelta = this.ImageProgress.GetComponent <RectTransform>().get_sizeDelta(); sizeDelta.x = x; this.ImageProgress.GetComponent <RectTransform>().set_sizeDelta(sizeDelta); }
protected override void StartExecute(bool isFastNav) { EntitySelf entSelf = EntityWorld.Instance.EntSelf; if (entSelf != null && entSelf.Actor) { if (this.mCurGoods != null) { Vector3 vector = new Vector3((float)this.mCurGoods.position.get_Item(0), (float)this.mCurGoods.position.get_Item(1), (float)this.mCurGoods.position.get_Item(2)) * 0.01f; Vector3 vector2 = new Vector3((float)this.mCurGoods.flyPosition.get_Item(0), (float)this.mCurGoods.flyPosition.get_Item(1), (float)this.mCurGoods.flyPosition.get_Item(2)) * 0.01f; if (this.mCurGoods.scene == MySceneManager.Instance.CurSceneID) { Vector3 vector3 = Vector3.get_zero(); if (this.mCurGoods.face.get_Count() >= 3) { vector3 = new Vector3((float)this.mCurGoods.face.get_Item(0), (float)this.mCurGoods.face.get_Item(1), (float)this.mCurGoods.face.get_Item(2)) * 0.01f; } Quaternion quaternion = Quaternion.Euler(vector3.x, vector3.y, vector3.z); Vector3 vector4 = quaternion * Vector3.get_forward() * 2f; float distanceNoY = XUtility.GetDistanceNoY(entSelf.Actor.FixTransform.get_position(), vector); if (isFastNav) { this.FastCollectGoods(distanceNoY, vector, vector2); } else { this.NormalCollectGoods(distanceNoY, vector); } } else if (isFastNav) { base.IsAutoNav = true; MainTaskManager.Instance.DelaySendFlyShoe(true, this.mCurGoods.scene, vector2); } else { base.IsAutoNav = false; TownCountdownUI townCountdownUI = UIManagerControl.Instance.OpenUI("TownCountdownUI", null, false, UIType.NonPush) as TownCountdownUI; townCountdownUI.StartTransmit(base.Task.taskId, this.mCurGoods.scene); } } else { Debug.LogFormat("<color=red>Error:</color>采集任务[{0}]数据已被销毁!!!", new object[] { base.Task.taskId }); } } }
public override void SelfActPointLmtChange(EntitySelf self) { BattleBlackboard.Instance.SelfActPointLmt = self.ActPointLmt; }
public override void SelfHpLmtChange(EntitySelf self) { BattleBlackboard.Instance.SelfHpLmt = self.RealHpLmt; }
public override void SelfHpChange(EntitySelf self) { BattleBlackboard.Instance.SelfHp = self.Hp; }
public override void SelfInitEnd(EntitySelf self) { base.SelfInitEnd(self); BattleBlackboard.Instance.SetSelfProperty(self.IconID, self.Lv, self.VipLv, self.Fighting, self.Hp, self.RealHpLmt, self.ActPoint); }
public static int GetDefence(EntitySelf self) { return((int)((double)self.Defence * (1.0 + (double)self.DefMulAmend * 0.001))); }
public static int GetAtk(EntitySelf self) { return((int)((double)self.Atk * (1.0 + (double)self.AtkMulAmend * 0.001))); }
public static long GetHpLmt(EntitySelf self) { return((long)((double)self.HpLmt * (1.0 + (double)self.HpLmtMulAmend * 0.001))); }
public virtual void SelfActPointLmtChange(EntitySelf self) { }
public virtual void SelfHpLmtChange(EntitySelf self) { }
public virtual void SelfInitEnd(EntitySelf self) { InstanceManager.SelfPositionGot(); }