Killed enemy in games will lost after set time => Are this enemy object detached?
1.1) This object after detached… > is he gone? (from merory) Because with makeCannonBall() metod i can crete thousand balls and i will need dispose of balls because they will soon or later fill memory to max. (if i will create another and another).
What i have to do for dispose of object?
Can i target the created object wich collisions(ray,…)?
1.1) normal java behavior, no reference means garbage. If you detach the object and remove the PhysicsObject from the PhysicsSpace (control.setEnbaled(false) or physicsSpace.remove(control)) and have no other reference to the object it will get garbage collected
What?
I suggest you do the tutorials once, they explain most of these things and how to do them.
/ 2) > If i create object by makeCannonBall() => I select secound obj created by Picking => If i “destoy” this selected object > do i destoy every object created by makeCannonBall() metod? [ “1)” enemy can be created similar metod]
What is faster/better action? >> create/remove box OR attach/detach box?
I have 2 ideas how create it. A) create matrix of boxes and show/hide them by attak/detach. B)create boxes, change them position and finally remove them after…“line of boxes”.