Members - Reputation: 107
Posted 29 November 2012 - 04:22 AM
I have a bitmap named obstacle.
i have drawn bitmap the bitmap in several places.
my problem is how to identify these 5 drawn objects indivually.
eg:- for collision detection i have a character.
if it collides with anyone it should die.
i have like
charcollides with obstacle then die.
my prob is it die only when it collides with first obstacle since all obstacles names are same.
what to do ???
one more thing how to get accurate values from accelometer ?
Thanks in advance
Crossbones+ - Reputation: 2937
Posted 29 November 2012 - 06:32 AM
If you can be more specific about your implementation then we can give more specific advice, but to state it broadly this is not a case where a 'bitmap' should be part of your logic. It should only be part of the representation of the outcome of your logic.
Can you post some code for us?
There are ten kinds of people in this world: those who understand binary and those who don't.
Members - Reputation: 301
Posted 29 November 2012 - 07:31 AM
You are going to need to create 5 separate instances of your Obstacle class, each with their own globally unique identifier (GUID). A good way to do this is to inherit publicly from a BaseGameEntity class that does all the registration and GUID assigning work for you on construction.
I wonder as I wander...