| | |
| | | { |
| | | this.configuration.maxHealth = health; |
| | | this.configuration.startingHealth = health; |
| | | this.configuration.SetMaxHealth(health); |
| | | this.configuration.Init(); |
| | | this.configuration.SetHealth(health); |
| | | |
| | |
| | | timeToPoisonHurt = 0; |
| | | bShieldBreak = false; |
| | | bInDeathAct = false; |
| | | |
| | | configuration.ClearShieldWall(); |
| | | |
| | | StopFrostParticle(); |
| | | //this.SetTargetableMatColor(Color.white); |
| | |
| | | protected virtual void Update() |
| | | { |
| | | this.UpdateAction(); |
| | | HandleShieldWall(); |
| | | |
| | | // 处理死亡状态了,不必再移动: |
| | | if (bInDeathAct || !CanMove) return; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理魔法护盾血量值 |
| | | /// </summary> |
| | | protected void HandleShieldWall() |
| | | { |
| | | if (configuration.IsExistShieldWall) |
| | | { |
| | | if (configuration.ShieldWallCurrentHealth <= 0.00001f) |
| | | configuration.IsExistShieldWall = false; |
| | | else if (configuration.ShieldWallEffectiveTime > 0.00001f) |
| | | { |
| | | if (configuration.ShieldWallRemainTime <= 0.00001f) |
| | | configuration.IsExistShieldWall = false; |
| | | else |
| | | configuration.ShieldWallRemainTime -= Time.deltaTime; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 限制当前Agent的移动位置,让Agent的移动看起来更帅一些 |
| | | /// </summary> |
| | | protected void restrictAgentPos() |