CTIN 289 - Interactive Snippets Library

Powered by 🌱Roam Garden

Smarter Collisions

// Smarter Collisions
Goomba potentialGoomba = collision.gameObject.GetComponent<Goomba>();

if (potentialGoomba != null) 
{
    Die();
}