33 lines
554 B
C#
33 lines
554 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class healing : MonoBehaviour
|
|
{
|
|
public GameObject effect;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
|
|
if (other.CompareTag("Player"))
|
|
{
|
|
Instantiate(effect, transform.position, transform.rotation);
|
|
Destroy(gameObject, 0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|