After spending an indecent amount of time on tinkering
with pre-fabricated code from here I there, and feeling rather
hopeless, I stumbled on a very helpful Youtube video(below).
The message eas salutary: programming and coding are not the same
thing: the first is being mathematically clear on what needs to happen,
the second is formulating instructions in this or that programming
language. I did not have a coding problem, I had a programming
problem.
I can - from the class page - define the behaviour of all instances
of that class. If the ball class is orange, all balls I create on main
will be orange. If I want to specify the behaviour of one or more balls
from main, I need to have them in an array, and refer to each and every
one of them. For i=1, 5 ball in ipair(balls)...turn blue. And I am free
to table.insert... or table delete...to change the number of balls in play.
Finally!!
Looking forward to getting this done, tomorrow.đ
No comments:
Post a Comment