Commit 7d3e45dc authored by DESKTOP-C0N3136\david's avatar DESKTOP-C0N3136\david
Browse files

Merge branch 'master' into EnemyMovementHopefullyNotBrokenThisTimeIDK

parents c8dedf1a 43c815b4
......@@ -33,8 +33,9 @@ public class EnemyMovement : MonoBehaviour{
// Update is called once per frame
void Update(){
// check if the player is within the notice range
if (Vector3.Distance (transform.position, player.transform.position) >= noticeDistance) {
if (Vector3.Distance (transform.position, player.transform.position) <= noticeDistance) {
// make the enemy chase the player
navMesh.speed = chaseSpeed;
} else {
\ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment