13 lines
219 B
C#
13 lines
219 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class Shield : MonoBehaviour
|
||
|
|
{ private void OnTriggerEnter(Collider other)
|
||
|
|
{
|
||
|
|
|
||
|
|
if (other.CompareTag("Bullet"))
|
||
|
|
{
|
||
|
|
Destroy(other.gameObject);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|