public void DeactivateGroup(UnitActionGroupTypes Type) { foreach (ActionGroup G in ActionGroups) { if (G.GroupType == Type) { G.DeactivateModules(); return; } } }
public void AddedModuleInGroup(Module module, UnitActionGroupTypes groupType) { foreach (ActionGroup G in ActionGroups) { if (G.GroupType == groupType) { G.AddedModule(module); return; } } ActionGroups.Add(new ActionGroup(groupType, module)); }
public void RemoveModuleInGroup(Module module, UnitActionGroupTypes groupType) { foreach (ActionGroup G in ActionGroups) { if (G.GroupType == groupType) { G.RemoveModule(module); if (G.Modules.Count == 0) { ActionGroups.Remove(G); } return; } } }
public ActionGroup(UnitActionGroupTypes type, Module module) { Modules.Add(module); GroupType = type; }