// Use this for initialization void Start() { //identify salvage targets if (player == null) { player = ScoreKeeper.playerAlive.GetComponent <PlayerControllerAlpha>(); } // player.chassis chassisList.options.Clear(); // chassisList.options.Add(new Dropdown.OptionData() { text = defaultSelection }); for (int i = 0; i < player.chassis.Length; i++) { chassisList.options.Add(new Dropdown.OptionData() { text = player.chassis[i].gameObject.name }); if (player.chassis[i] == player.activeChassis) { chassisList.value = i; } } GetComponentInChildren <Text>().text = "Current Chassis: " + player.activeChassis.gameObject.name; }
void Start() { if (GameObject.FindGameObjectWithTag("Player") == null) { Player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControllerAlpha>(); } }
void Start() { if (player == null) { player = ScoreKeeper.playerAlive.GetComponent <PlayerControllerAlpha>(); } // availableGuns = player.activeChassis.transform // availableGuns = GameObject.FindGameObjectsWithTag("PlayerGun"); mainCameraShell = GameObject.FindGameObjectWithTag("CameraControl").GetComponent <GunCamera>(); turretAim = false; firingZero = GameObject.FindGameObjectWithTag("fireZero"); WeaponSwitch(currentGun); }