-
Notifications
You must be signed in to change notification settings - Fork 0
Unit Groups
SimonPrins edited this page Oct 13, 2015
·
1 revision
The UnitGroup classes can be found in the UnitGroups folder. These UnitGroups manage certain groups of units. They each have a list of all agents that they control.
All UnitGroups extend the abstract UnitGroup class. This class provides the abstract onFrame method. This method will be called once per frame for all UnitGroup objects that are added to the list of groups managed by the Tyr class. This method is used by the UnitGroups to perform the actual logic that controls the units. Each frame, before onFrame is called, the cleanup method is also called. This allows the UnitGroup to remove Agents from its list if those agents have died. Subclasses may override this method if they need to perform additional actions during cleanup.