Visible view and destroy sprite

TravisBayTravisBay USMember

So, I had a newb question. I am creating a game that has to do with avoiding obstacles. I am having a problem:

VisibleBoundsWorldspace <<< This doesn't seem to get visible bounds on the actual devices, rather it gets the visible bounds that has been loaded. Is there a way to find out the size in pixels of the actual view on the device and use that for calculations? So I originally set this to 320wX640h and those are the dimensions I am getting but they aren't the dimensions of the device.

What is the proper way of removing a sprite and then adding a sprite back into the game?

Best Answer

  • TravisBayTravisBay USMember
    Accepted Answer

    OMG....okay, so I did a newb thing. The first issue I had, was because of a dumb mistake on my part. I was looking at the samples/tutorials and found out, what I was comparing the visible bounds to was the velocity. Obviously the velocity would never get larger than the bounds (unless if you did that on purpose). So instead, now I am looking at the sprites position instead.

    My next question still stands. What is the proper way on removing the sprite. I see there is a dispose method on the object, but is that the way to do it? Or do you use Destroy? Just curious.

Answers

  • TravisBayTravisBay USMember
    Accepted Answer

    OMG....okay, so I did a newb thing. The first issue I had, was because of a dumb mistake on my part. I was looking at the samples/tutorials and found out, what I was comparing the visible bounds to was the velocity. Obviously the velocity would never get larger than the bounds (unless if you did that on purpose). So instead, now I am looking at the sprites position instead.

    My next question still stands. What is the proper way on removing the sprite. I see there is a dispose method on the object, but is that the way to do it? Or do you use Destroy? Just curious.

Sign In or Register to comment.