[SOLVED]Question in Destroying Objects
hi everyone I would like to ask on how would I be able to destroy falling objects in the game I'm making
the objects are supposed to be destroyed once the user input a correct answer
i think i'll be using this algorithm
but apparently, I will not be using array anymore...
anyone have an idea?
And how about your array, if it's a property in QML or not
Thanks for your reply Chuck. I have another question. How would I limit the number of falling objects in my game? Since I still haven't implemented a timer.. I want to have falling objects stop, say, after one minute? how's that?
[quote author="lexan" date="1310295579"]Thanks for your reply Chuck. I have another question. How would I limit the number of falling objects in my game? Since I still haven't implemented a timer.. I want to have falling objects stop, say, after one minute? how's that?
Just use a int property like
@property int objectCount: MAX_COUNT@
I think timer is the best way, it's very simple using QML :D
Dynamic Object Management in QML :
but hey how can I destroy an object based on an event or on a trigger??
for example.. if the user inputted/key in a correct answer the falling object must be destroyed?
how would i do that??
I had done similar coding for my The Math Game, in this game some coulds fall from top and when user answer correct answer it got destroyed.
I had written down my experience for creating that game in following post. Check out "Performing animation on component destruction." section. that might help you.