I have a single list in a tentity type that all of my other game types are extended from, for example player, enemies, bullets and so on. All seems to work well, I can update all of my game objects by running through this single list that everything gets added to when it is created.
The problems begin when I try to check for a collision between two of the object in the one, single list. How can I check for example for collisions between the players bullets and the enemies to see if they have been hit? Is there a way to find out whether a type is an enemy or a player and so on? I`m a little confused but I`m sure that the solution is really simple.
Do I need to use multiple lists instead? One for the enemies, one for the bullets... I`d really like to stick to the one if possible.
Any examples or help would be most appreciated.
Jason.
The problems begin when I try to check for a collision between two of the object in the one, single list. How can I check for example for collisions between the players bullets and the enemies to see if they have been hit? Is there a way to find out whether a type is an enemy or a player and so on? I`m a little confused but I`m sure that the solution is really simple.
Do I need to use multiple lists instead? One for the enemies, one for the bullets... I`d really like to stick to the one if possible.
Any examples or help would be most appreciated.
Jason.