Let's say I have a group of 50 entites of 6 classtypes.
I want to perform an action on particular entity after aiming at it.
Is it more efficient to check if the entities index falls within a certain number
PHP Code:
if(50 <= entity <= 100)//hypothetical index values
{
do stuff;
}
or
is it more efficient to check if they are of the desired class
PHP Code:
GetEntityClassname(entity,string,length);
if (string = desiredclass)
{
do someting;
}