Hi,
I have a class I use for a spaceship that inherits from Sprite. I call methods like setRotation() on it. However, I really wish I could call setRotation() but include some of my own code into that method. I realize I can do this, but this does not work because it simply overrides the setRotation() method.
spaceship = Core.class(Sprite)
function spaceship:init()
end
function spaceship:setRotation()
-- SOME EXTRA CODE
-- HOW DO I ACTUALLY ROTATE THE SPRITE FROM WITHIN THIS FUNCTION?
end |
How would I actually rotate the sprite from within that method? I have seen some posts related to this but did not really understand them. Help would be very appreciated. Thanks!
Comments
I do this at the start of the class
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
http://www.giderosmobile.com/DevCenter/index.php/Forum_FAQ#How_can_I_highlight_my_Lua_code_in_the_forum_post.3F
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova