chenxin
2020-10-21 16afec10e117a04846266fa6584b3fb1329ec7d2
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);