Hi everyone.
I am building a simple spawner system, and spawner (button), can have 5,4,3,2,1,0 items, inside of this buttons, and it should update every time that i create a object or remove this object, and i am learning about the best ways to do that, it is simple, i click on the button and it create a object, and then i click on the object and it is removed. i am using sprite sheet to show the spawner, i am coding some like it:
local count = 0
spawner.currentFrame = count
-- When i create the object it increase the count 1 value (count =count +1) and when,
--i kill the object the count decrease one value (count = count -1), i use widget buttons on all other
--buttons on my game, but on this part, it will be a lot of button if a create some spawners, using sprite
--sheets dont have problems? on simulator everything is good, but i really dont know on the real
--device, and the game cant crash or have bad coding :)
Thanks [import]uid: 26056 topic_id: 22822 reply_id: 322822[/import]
[import]uid: 52491 topic_id: 22822 reply_id: 91211[/import]