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); } }
public void ReceiveDamage(Damage damage) { damageBlink.Blink(); }