scope of self in classes
Posted: Wed Oct 21, 2020 1:56 am
I'm using the classes lib from CS50 (I'll show in the code below). I have a Shield.lua class for a shield, https://github.com/vinperdom/Colorless/ ... Shield.lua (here, and the class lib is in lib/class.lua).
If I put all the logic inside the update function it works properly, but if I abstract a little with the "move" function, the quad never changes from what it was defined in init. Why?
If I put all the logic inside the update function it works properly, but if I abstract a little with the "move" function, the quad never changes from what it was defined in init. Why?