13 lines
321 B
C#
13 lines
321 B
C#
using UnityEngine;
|
|
|
|
public class ClearingProjectile : Projectile
|
|
{
|
|
protected override void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
base.OnTriggerEnter2D(other);
|
|
if (!other.CompareTag(tag) && other.TryGetComponent(out Projectile isProjectile))
|
|
{
|
|
Destroy(other.gameObject); //should it destroy or reflect?
|
|
}
|
|
}
|
|
}
|