The Holy Grail
Every once in a while, in the midst of spelunking after hopeless treasure maps, some crazy glimpse of light emerges. I was desperately trying to understand why I couldn’t find any calls to OnTriggerEnter2D in the project’s scripts. I found it declared a few times. I began to think that maybe its a special function like Update() which either loops or starts back at the top each frame (not necessarily the same thing maybe, but my brain is way too overwhelmed at the moment to know or care about the difference). The point of all this verbosity is that I had found a rule!
What I am dying for throughout this process.
Its actually pretty likely that if I go back and watch the videos, that Jonathan had been perfectly plain and told us that this function was called by Unity itself upon meeting certain conditions, without being called by the user’s script. He probably said it. But for me, it had to be beaten into my head. This picture for me is a small part of the Rosetta Stone. Rules, REAL rules. The bridge between the language of Unity and C# and my own thoughts. More of these please!
This is the sort of thing I had really been waiting for and now we are moving forward:
Today I was able to attach some scripts and control their component values from other scripts, without too much fuss. I got the Boss Alien started, and with some help got it to go back and forth like a shooting gallery duck. I got damage when we collide! Lots to go, but I think the boss will be done tomorrow. I think that means 4 points to go to get out of this section.
And what a lifesaver! I accidentally erased my asteroid, but today I got to meet “Export Package”. I went back to an earlier Git branch exported the asteroid, switched back to my main branch and put it all back together. Awesome!