void Main(string argument) { if (hang == null) hang = new HangarController(GridTerminalSystem, Me, Echo, ElapsedTime); if (argument.Length > 0) { int groupNumber = hang.groups.IndexOf(argument); if (groupNumber != -1) hang.requests.Add(new requestTicket(groupNumber, "toggle")); else Echo("Invalid argument! Ignoring."); } hang.mainLoop(); }
private void Awake() { #region Singleton HangarController[] list = FindObjectsOfType <HangarController>(); if (list.Length > 1) { Destroy(this); Debug.Log("Multiple instances of the HangarController component detected. Destroying an instance."); } else { instance = this; } #endregion }
void Main(string argument) { if (hang == null) { hang = new HangarController(GridTerminalSystem, Me, Echo, ElapsedTime); } if (argument.Length > 0) { int groupNumber = hang.groups.IndexOf(argument); if (groupNumber != -1) { hang.requests.Add(new requestTicket(groupNumber, "toggle")); } else { Echo("Invalid argument! Ignoring."); } } hang.mainLoop(); }
private void Awake() { hangarController = GetComponent <HangarController>(); }