Example #1
0
 public void ReceiveDamage(Damage damage)
 {
     hp -= damage.amount;
     if (hp < 0)
     {
         Die();
     }
     damageBlink.Blink();
 }
        private void Update()
        {
            if (isBlinkingPaused)
            {
                return;
            }

            nextBlinkTimer            -= Time.deltaTime;
            blinkingRemainingDuration -= Time.deltaTime;
            if (nextBlinkTimer <= 0)
            {
                blinkComponent.Blink();
                nextBlinkTimer = Mathf.Max(MINE_BLINK_PERIOD_MIN, blinkingRemainingDuration * MINE_BLINK_PERIOD_FACTOR);
            }
        }
Example #3
0
 public void ReceiveDamage(Damage damage)
 {
     damageBlink.Blink();
 }