public Unit getUnits()
{
return units;
}
Basically this thing is being stubborn, the reasoning is beyond me. It has 9 values in it that can be accessed with other functions such as
public Unit unit(int num)
{
return units[num];
}
however attempting to return the array for a foreach is met with errors when attempting to manipulate past the first(0) object. The below code will allow the unit to do the animation – but only the first one.
foreach (Unit u in players[0].army.getUnits())
{
u.anim(ACTION.STRIKE3);
}
It feels like something dumb is being done by me, but I can’t for the life of me figure out what it is. The unit Army class is being accessed in the first two functions, trying to get the unit class objects, which calls prefabs.
The length is 9, as it should be, but get nullRef on second pass... will try this and see if there are any changes.
– Remm:) I was about to point that out...
– whydoidoit