Hey guys!
I am creating an example class to make my first steps. I m thinking about to create a display object within the constructor of the class and let this object rotate in relation to accelerometer xGravity.
The main question I have is whether I should or can not put a runtime event in my class. The “cleanest” way I would prefer is to create an object
-- main.lua local myObject = myClass.new("object.png");
and then let it rotate for example
myObject:rotate(rotateSpeed);
But in this case I have to put all the runtime stuff and later also physics stuff in the class. Is this the right way?
Thanks in advance!!