private void Start() { cam = Camera.main; bulletWeaponPool = new WeaponPoolerScript(bulletPrefab, bulletAmmoSize); //rocketWeaponPool = new RocketPoolerScript(rocketPrefab, rocketAmmoSize); invertCharacterMask = ~invertCharacterMask; }
void Awake() { weaponPool = new WeaponPoolerScript(bulletPrefab, 350); if (player == null) { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); } if (powerLevel < 0 || powerLevel > 3) { Debug.LogError("Invalid Power Level set", gameObject); } }
public WeaponPoolerScript(GameObject _prefab, int _size) { if (Instance != null) { return; } Instance = this; objectPool = new List <GameObject>(); prefab = _prefab; size = _size; GrowPool(); }