Great timing with this lecture! I love the way you’ve presented this. I remember it somewhat from 1.0, but clearly not enough (I’ve had this gem in my source-code for a while longer than I wanted, but I’ve kept myself distracted from it with other things that also need addressing When I wake-up it’ll get a good squashing though, thanks for the perspective!
It’s good to keep re-enforcing the idea that most answers are out there, if you only manage to look in the right place. That’s how I’ve managed to get my “Argon Assault” to nearly 900 lines of C# in 10 files now: spawning enemies and bonuses, pooling effects, managing player energy and death… Fun stuff!
#region Collision events...
private void OnCollisionEnter(Collision collision)
{
// TODO: we're obviously colliding with things... why no log messages?
Debug.Log("PlayerController.cs COLLISION tag: " + collision.gameObject.tag);
}