From 74daf5509be4fc140fd1bdb6d4df5f1c1002e368 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Thu, 22 Oct 2020 17:28:08 +0800 Subject: [PATCH] Merge branch 'master' of ssh://172.16.1.52:8091/GemBattle --- Assets/Scripts/ActionGameFramework/Health/Targetable.cs | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/Assets/Scripts/ActionGameFramework/Health/Targetable.cs b/Assets/Scripts/ActionGameFramework/Health/Targetable.cs index 53ea344..66d4879 100644 --- a/Assets/Scripts/ActionGameFramework/Health/Targetable.cs +++ b/Assets/Scripts/ActionGameFramework/Health/Targetable.cs @@ -50,6 +50,21 @@ protected int poisonAttid = 0; protected float timeToPoisonHurt = 0.0f; + /// <summary> + /// 是否处于 中毒状态 + /// </summary> + protected bool isPoison; + + /// <summary> + /// 中毒粒子特效 + /// </summary> + public ParticleSystem PoisonParticle; + + /// <summary> + /// 中毒结束播放的粒子特效 + /// </summary> + public ParticleSystem PoisonEndParticle; + protected Color mMatColor; /// <summary> @@ -135,6 +150,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