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 Start() { ui_script_1 = GameObject.Find("Canvas").GetComponent <UI_script>(); Instantiate(prefab_Script_1.gameObject, new Vector3(Random.Range(-60f, 30f), 5, Random.Range(-5f, 20f)), Quaternion.identity); }
void Awake() { Instance = this; }
void Start() { Instance = this; WeaponClick(0); wp = Whirpool.Instance; }