From c49c0e39e4c11a438014a0b0732ecf0968fceb5e Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Fri, 27 Nov 2020 20:58:36 +0800 Subject: [PATCH] 出二级宝石的时间不对的bug --- Assets/Scripts/ActionGameFramework/Health/Targetable.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/Assets/Scripts/ActionGameFramework/Health/Targetable.cs b/Assets/Scripts/ActionGameFramework/Health/Targetable.cs index 53ea344..1b3292d 100644 --- a/Assets/Scripts/ActionGameFramework/Health/Targetable.cs +++ b/Assets/Scripts/ActionGameFramework/Health/Targetable.cs @@ -50,6 +50,46 @@ protected int poisonAttid = 0; protected float timeToPoisonHurt = 0.0f; + /// <summary> + /// 是否处于 中毒状态 + /// </summary> + protected bool isPoison; + + /// <summary> + /// 是否处于减速状态 + /// </summary> + protected bool isSlowDown; + + /// <summary> + /// 是否处于冰冻状态 + /// </summary> + protected bool isFrost; + + /// <summary> + /// 中毒粒子特效 + /// </summary> + public ParticleSystem PoisonParticle; + + /// <summary> + /// 中毒结束播放的粒子特效 + /// </summary> + public ParticleSystem PoisonEndParticle; + + /// <summary> + /// 减速粒子特效 + /// </summary> + public ParticleSystem SlowDownParticle; + + /// <summary> + /// 冰冻特效 + /// </summary> + public ParticleSystem FrostParticle; + + /// <summary> + /// 被火技能攻击特效 + /// </summary> + public ParticleSystem FireSkillParticle; + protected Color mMatColor; /// <summary> @@ -135,6 +175,14 @@ { if (this.poisonTimes >= 1) return; + if (!isPoison) + { + isPoison = true; + + if (PoisonParticle != null) + PoisonParticle.Play(); + } + this.poisonTimes++; this.poisonAttid = attid; this.poisonHurt = (float)Math.Floor(this.configuration.maxHealth / 20.0f); -- Gitblit v1.9.1