void Awake() { Instance = this; GameObject[] s = GameObject.FindGameObjectsWithTag("ship"); ships = new ShipData[s.Length]; for (int i = 0; i < s.Length; i++) { s[i].transform.GetChild(1).GetComponent <Ship>().InitShip(); ships[i] = s[i].transform.GetChild(1).GetComponent <Ship>().data; } input = _CustomInput.Instance; wd = WeaponData.Instance; ui = UI_script.Instance; if (ships[1].playerControlled) { ShipData t = ships[0]; ships[0] = ships[1]; ships[1] = t; } ui.InitPanels(); }
void Awake() { Instance = this; }
void Start() { Instance = this; }