using System.Collections; using System.Collections.Generic; using UnityEngine; public class TruthBullet : Bullet { protected override void OnTriggerEnter(Collider other) { if (other.gameObject.layer != LayerMask.NameToLayer("Scattered") && other.gameObject.layer != LayerMask.NameToLayer("Player")) { if (other.GetComponent() != null) { other.GetComponent().Break(); } else if (other.GetComponent() != null) { other.GetComponent().Interact(this); } Destroy(gameObject); } } }