using System.Collections; using System.Collections.Generic; using UnityEngine; public class PortalBulletSpawner : MonoBehaviour{ PlayerController player; MapCellCalculator map; void Awake(){ player = FindObjectOfType(); map = FindObjectOfType(); } void OnTriggerEnter(Collider col){ if (col.CompareTag("Player")){ AudioManager.instance.PlayOneShot("Powerup"); player.numberOfCharge++; map.CanSpawnEnergy(); gameObject.SetActive(false); } } }