Boar
This commit is contained in:
1 parent
63c3549673
commit
28125eb382
19 files changed
+912
-143
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class BoarRadar : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Boar boar;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
boar.GotTarget(other.transform);
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
boar.LostTarget();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user