Heroes_of_Hiis/Assets/Projectile.cs

17 lines
391 B
C#
Raw Normal View History

2022-03-24 16:02:34 +00:00
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);
}
}
}