/// <summary> /// Sends the command for all AgentControllers under the control of this PlayerManager... /// Mainly for shared control capabilities /// </summary> /// <param name="com">COM.</param> public static void SendCommand(Command com) { com.Add <Selection>(new Selection()); for (int i = 0; i < AgentControllers.PeakCount; i++) { if (AgentControllers.arrayAllocation [i]) { AgentController cont = AgentControllers [i]; if (cont.SelectedAgents.Count > 0) { com.ControllerID = cont.ControllerID; #if false if (cont.SelectionChanged) { com.SetData <Selection>(new Selection(cont.SelectedAgents)); cont.SelectionChanged = false; } else { com.ClearData <Selection>(); } #else //we always sending selection data com.SetData <Selection>(new Selection(cont.SelectedAgents)); cont.SelectionChanged = false; #endif CommandManager.SendCommand(com); } } } }
/// <summary> /// Sends the command for all AgentControllers under the control of this PlayerManager... /// Mainly for shared control capabilities /// </summary> /// <param name="com">COM.</param> public static void SendCommand(Command com) { com.Add <Selection>(new Selection()); for (int i = 0; i < AgentControllers.Count; i++) { AgentController cont = AgentControllers[i]; if (cont.SelectedAgents.Count > 0) { com.ControllerID = cont.ControllerID; if (cont.SelectionChanged) { com.SetData <Selection>(new Selection(cont.SelectedAgents)); cont.SelectionChanged = false; } else { com.ClearData <Selection> (); } CommandManager.SendCommand(com); } } }