android - Corona SDK animation not working with the director class? -


hey there trying use animations in game reason error here code used animation

local function animate( event )     gear.rotation = gear.rotation + 10 end runtime:addeventlistener("enterframe", animate); 

this works if use without director class director class change scene scene

i error message when try leave class or when go other class rotates until try leave class

the error = attempt perform arithmetic on field 'rotation' (a nil value)

any please in advance!

try this:

gear.rotation = 0  local function animate( event )     gear.rotation = gear.rotation + 10 end  runtime:addeventlistener("enterframe", animate); 

Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -