Exemplo n.º 1
0
        public override float StartCure(ICure icure, float healthValue)
        {
            if (Mathf.Abs(TotalHealth - VirusHealth.Value) > 0.1f)
            {
                _virusHealthAddEffect.StartHealthEffect(icure);
            }
            float vv         = base.StartCure(icure, healthValue);
            var   virusLevel = VirusTool.GetVirusColorLevel("VampireVirus", VirusGameDataAdapter.GetLevel(), VirusHealth.Value);

            if (virusLevel != CurColorLevel)
            {
                CurColorLevel = virusLevel;
                VirusSprite.Initi(CurColorLevel);
                transform.GetComponent <BubbleEffectMrg>().SetBubbleSprite(CurColorLevel);
            }
            return(vv);
        }
Exemplo n.º 2
0
        public override float StartCure(ICure iCure, float healthValue)
        {
            float vv         = base.StartCure(iCure, healthValue);
            var   virusLevel = VirusTool.GetVirusColorLevel("RegenerativeVirus", VirusGameDataAdapter.GetLevel(), VirusHealth.Value);

            if (virusLevel != CurColorLevel)
            {
                CurColorLevel = virusLevel;
                VirusSprite.Initi(CurColorLevel);
                transform.GetComponent <BubbleEffectMrg>().SetBubbleSprite(CurColorLevel);
            }
            if (Mathf.Abs(VirusHealth.Value - TotalHealth) < 0.1f)
            {
                _virusHealthAddEffect.StopHealthEffect(this);
            }
            return(vv);
        }
Exemplo n.º 3
0
        public override void Injured(float damageValue, bool isEffect)
        {
            if (VirusHealth.Value - damageValue <= 0)
            {
                Death(true, true, true, true);
                return;
            }
            VirusHealth.Value -= damageValue;
            var virusLevel = VirusTool.GetVirusColorLevel("VampireVirus", VirusGameDataAdapter.GetLevel(), VirusHealth.Value);

            if (virusLevel != CurColorLevel)
            {
                CurColorLevel = virusLevel;
                VirusSprite.Initi(CurColorLevel);
                transform.GetComponent <BubbleEffectMrg>().SetBubbleSprite(CurColorLevel);
            }
            if (isEffect)
            {
                virusHurtEffect.StartHurtEffect();
            }
        }
Exemplo n.º 4
0
        public override void Injured(float damageValue, bool isEffect)
        {
            if (VirusHealth.Value - damageValue <= 0)
            {
                Death(true, true, true, true);
                return;
            }
            VirusHealth.Value -= damageValue;
            var virusLevel = VirusTool.GetVirusColorLevel("RegenerativeVirus", VirusGameDataAdapter.GetLevel(), VirusHealth.Value);

            if (virusLevel != CurColorLevel)
            {
                CurColorLevel = virusLevel;
                VirusSprite.Initi(CurColorLevel);
                transform.GetComponent <BubbleEffectMrg>().SetBubbleSprite(CurColorLevel);
            }
            if (isEffect)
            {
                _virusHurtEffect.StartHurtEffect();
            }
            _virusHealthAddEffect.StopHealthEffect(this);
            _totalTime = 0.5f;
            _ishurt    = true;
        }