NestorTejero / ES2016A

VideoJoc Curs Enginyeria Software 2016 - grup A de pràctiques (dijous)
https://nestortejero.github.io/ES2016A/
GNU General Public License v3.0
2 stars 0 forks source link

Towers rotate gradually, Projectiles move smoothly #180

Closed Nerucius closed 7 years ago

Nerucius commented 7 years ago

unity 2016-12-05 23-05-40-60

sdiaz7 commented 7 years ago

SelfDestroy code should be something like:

protected virtual void SelfDestroy()
{
    if (transform.parent == null)
        Destroy(gameObject);
    else
        Destroy(transform.parent.gameObject);
}

Calling destroy on parent object also removes all of its children.

Nerucius commented 7 years ago

Script change implemented at 1038649