hi everyone I started working on defold engine a few days back. am facing one problem like I have a collection factory inside I have five different type of color ball’s is there I need to do like every time ball’s need to create one by one after particular position it needs to delete once again it needs to create back of the last ball already create any one please help me to slove this problem … thank you.
I’m not sure I understand what you mean. It is a terribly long sentence.
Trying to break it down:
- I have a collection factory
- inside I have five different type of color ball’s
- I need to do like every time ball’s need to create one by one after particular position
- it needs to delete once again
- needs to create back of the last ball already create
So you want to create five different colored balls and you need to position each of them in a particular position? And then you need to delete them and create new ones with updated positions?
I’m not sure if a collection factory is the best choice. Why not use a game object factory and use it to create 5 balls. You can then change the color of each ball using sprite.play_flipbook() and you can position each ball using go.set_position() or with an argument to factory.create().
am trying to say when the game is started I need to create moving color balls one by one after reached some position the ball disappears like an infinite color ball keeps creating after reached a particular position it disappears.
Thanks for your suggestions but any other possibility’s is there.
Ok, thank you for clarifying!
Well, create ball game objects, either one by one using a game object factory or in a group using a collection factory. Then either animate them using go.animate() or add physics and apply a force or gravity. If you use go.animate() you can use the callback function to delete the ball and then create a new one again.
thank you :)))))