My question:
For example I have class enemy, let's say I have 100 enemy types.
Now in Update()(each frame)
if(enemyType==Type1)
{doWhat Type1 does}
else if(enemyType==Type2)
{doWhat Type2 does}
else if(enemyType==Type3)
{doWhat Type3 does}
...
else if(enemyType==Type100)
{doWhat Type100 does}
so in each frame I can call up to 100*enemy count
so is there any way to avoid this , to tell it earlier what update should it do
I am working in unity, but is there universal way or?