Is there a way of finding an unique Type in a list of different types?
I have a global list of TElements containing all kind of child types of TElement (like TPlayer, TEnemy and TDetails). I know there could be one object in that list of type TDetails and I need to verify if that object still exists.
Below you see an example of a 'not so efficient'code. I think there must be a better solution.
I have a global list of TElements containing all kind of child types of TElement (like TPlayer, TEnemy and TDetails). I know there could be one object in that list of type TDetails and I need to verify if that object still exists.
Below you see an example of a 'not so efficient'code. I think there must be a better solution.
Function hasDetails:Byte() Local n = 0 For Local e:TDetails = EachIn gElements n:+1 Next Return n>0 End Function