I have a problem.
I have a game with many units, but each unit has an instance variable called Team which marks what team they are on.
In this example, it's a space ship called SpaceFighter-- this is only one Object type. I do not want to clone this object type or make a duplicate object type, I want to do this using instance variables. There's two teams. Team 1 and Team 2.
So there's two SpaceFighters.
SpaceFighter 1 : Team = 1
SpaceFighter 2 : Team = 2
They fly around and also have a Turret behavior, it's great. However, adding targets has proven to be difficult.
I obviously only want SpaceFighter 1 to target objects on Team 2 and not it's own team (Team 1), but I'm not sure how to do that.
Does anyone have any ideas?