private void Die(float deltaTime) { deathTime -= deltaTime; float scale = size * Mathf.Abs(deathTime) / 2.0f; this.transform.localScale = new Vector3(scale, scale, scale); if (deathTime <= 0) { creatureManager.Death(this); } }