add: EyeEnemy proper functionality

This commit is contained in:
KOSMOGOR
2025-04-25 14:47:48 +03:00
parent dc6707f2a9
commit 1b106e4e18
12 changed files with 249 additions and 8 deletions
+2
View File
@@ -7,9 +7,11 @@ public class GroundDetector : MonoBehaviour
public void OnTriggerEnter(Collider other) {
if ((1 << other.gameObject.layer & groundMask) != 0) onGround = true;
// onGround = true;
}
void OnTriggerStay(Collider other) { OnTriggerEnter(other); }
void OnTriggerExit(Collider other) {
if ((1 << other.gameObject.layer & groundMask) != 0) onGround = false;
// onGround = false;
}
}