17 lines
391 B
C#
17 lines
391 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Projectile : MonoBehaviour
|
|
{
|
|
private bool collided;
|
|
private void onCollisionEnter(Collider other)
|
|
{
|
|
if (other.gameObject.tag != "IceBolt" && other.gameObject.tag != "Player" && !collided)
|
|
{
|
|
collided = true;
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|