15 lines
334 B
C#
15 lines
334 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class ProjectileTrigger : MonoBehaviour
|
||
|
|
{
|
||
|
|
[SerializeField] GameObject[] projectiles;
|
||
|
|
void OnTriggerEnter(Collider other)
|
||
|
|
{
|
||
|
|
if(other.gameObject.tag == "Player")
|
||
|
|
{
|
||
|
|
foreach (GameObject projectile in projectiles)
|
||
|
|
projectile.SetActive(true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|