void Start() { weaponSelect = FindObjectOfType <WeaponSelect>(); pickupManager = GetComponentInParent <PickupManager>(); pickupSpawnPoint = GetComponentInParent <PickupSpawnPoint>(); ammoType = weaponPrefab.GetComponentInChildren <Weapon>().GetAmmoType(); ammo = FindObjectOfType <Ammo>(); }
private void PopulateSpawnPoint(Pickup pickup, PickupSpawnPoint spawnPoint) { Instantiate(pickup.pickupPrefab, spawnPoint.transform); freeSpawnPoints.Remove(spawnPoint); spawnPoint.isPopulated = true; }
public void UnpopulateSpawnPoint(PickupSpawnPoint spawnPoint) { spawnPoint.isPopulated = false; freeSpawnPoints.Add(spawnPoint); }
void Start() { pickupManager = GetComponentInParent <PickupManager>(); pickupSpawnPoint = GetComponentInParent <PickupSpawnPoint>(); ammo = FindObjectOfType <Ammo>(); }
void Start() { playerHealth = FindObjectOfType <PlayerHealth>(); pickupManager = GetComponentInParent <PickupManager>(); pickupSpawnPoint = GetComponentInParent <PickupSpawnPoint>(); }