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