What is faster:
1) have a lot of bots with actions
action Bot()
{
while(1)
{
ControlHpPanelPos();
wait(1);
}
}
2) to have one function, that would runs through all bots and control position of their Hp panels?
void ControlBotsHpPanels()
{
ENTITY* FirstTeam[20];
ENTITY* SecondTeam[20];
while(1)
{
if (NowTeam == 1)
{
RunThroughFirstTeamPlayersAndControlTheirHpPanels();
}
else
{
RunThroughSecondTeamPlayersAndControlTheirHpPanels();
}
wait(1);
}
}