Beispiel #1
0
    public virtual void Die(bool byAge)
    {
        IsAlive = false;

        CurrentWorld.EntityDie(this, byAge);

        ParticleSystem particles = Instantiate(DeathParticles, this.transform.position, Quaternion.identity);

        Destroy(particles.gameObject, particles.main.duration);

        Destroy();
    }