giovedì 5 maggio 2016

Day 120: Scripting system

Today I implemented the scripting system. Each GameObject can have a list of scripts attached to it.
Each script ha a Start-Update-Input method, and these will be called automatically by the engine, only if the script are attached to a gameobject.

I played around with them in the scene I made a couple of days ago: a script handles the movement of the lights, another one their color, and finally the scene script calls methods on them to set the speed of the lights. Nothing of this could be deduced by the image, but still that's the result!

Finally I added a reset scene method in the shell, which can be called with \r.


Nessun commento:

Posta un commento