i have my code work correctly during ‘Play Game’ mode.
which my character stay static with following code
self.instance:prepare("idle")
self.instance:play()
which will perform ‘idle’ action. But once the game is ‘Game over’ mode, then i will swtich to ‘Character Select’ mode again (i am using Director class to do that)
After character is selected, it will came back to ‘Play Game’ mode.
But this time, the program will show error below
Runtime error
/Users/admin/Desktop/myCorona/ionr2/Player.lua:361: attempt to call method 'prepare' (a nil value)
stack traceback:
[C]: in function 'prepare'
/Users/admin/Desktop/myCorona/ionr2/Player.lua:361: in function 'idle'
any idea on this? it’s actually a sprite function ‘prepare’
thanks for showing some light here [import]uid: 10373 topic_id: 9377 reply_id: 309377[/import]