private void StopAllUnits() { foreach (var Unit in MouseManager.Current.Selections) { Unit.GetComponent <CommandManager>().AddCommand(Cmd_Stop.New(Unit.gameObject)); } }
public static Cmd_Stop New(GameObject prGameObject) { Cmd_Stop newcommand = prGameObject.AddComponent <Cmd_Stop>(); return(newcommand); }