Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Timed objects falling down — Gideros Forum

Timed objects falling down

DikkesnoekDikkesnoek Member
edited April 2013 in General questions
Hi,

I try to create falling objects from the sky. I use a timer creating a block with body
every second. For the block i'll use a separate class with it's own onEnterFrame handler
It's falling down and it will disappear when it reaches the bottom of the screen. What is
wierd is that every new block will fall faster. Is the gravity (normal 9.8m/s2) become
higher? When I the block is disappearing from the screen I want to remove it from the
parent. Can I do this in the block class with for example self:removeFromParent()?

Thanks,

Marc

Comments

  • Is the gravity (normal 9.8m/s2) become higher?

    No. are you removing the block at the end with its physics body or just repositioning them at the top again?

    Can I do this in the block class with for example self:removeFromParent()?

    better to it in the main class and make sure to remove the physics body before

    :)
  • Thank you. I solved it like you mentioned by removing
    the objects in the main class. Iterating through the
    Actors will do finally do the trick.

    Regards,

    Marc

    Likes: hgvyas123

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.