Entity Type
Posted: Sun Jul 11, 2010 6:56 am
Im lokking for a way to get the type of entity of something, im currently using an entity as a parameter for a drawing class and im trying to get different funcitons for different entities ie.Box, Sphere, triangle..etc
heres my code:
public void add(Entity type, Model model, Color color, Vector3 position)
ive looked through the Entity Class and Box class but cant find a way to do this becuase each entity inherits the Entity Class itself,
I guess i could just have different add functions for each entity like so
public void add(Box box, Model mode....etc)
&
public void add(Sphere sphere, Model model...etc)
but i was hoping for a more effecient way for doing this?
heres my code:
public void add(Entity type, Model model, Color color, Vector3 position)
ive looked through the Entity Class and Box class but cant find a way to do this becuase each entity inherits the Entity Class itself,
I guess i could just have different add functions for each entity like so
public void add(Box box, Model mode....etc)
&
public void add(Sphere sphere, Model model...etc)
but i was hoping for a more effecient way for doing this?