Commit 43c815b4 authored by DESKTOP-C0N3136\david's avatar DESKTOP-C0N3136\david

fixed a small bug

parent e9f0d358
......@@ -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 {
......
{"m_ExpandedPrefabGameObjectFileIDs":[],"m_ExpandedSceneGameObjectInstanceIDs":[],"m_ScrollY":0.0,"m_LastClickedFileID":0,"m_LastClickedInstanceID":0}
\ No newline at end of file
{"m_ExpandedPrefabGameObjectFileIDs":[],"m_ExpandedSceneGameObjectInstanceIDs":[-1068],"m_ScrollY":0.0,"m_LastClickedFileID":0,"m_LastClickedInstanceID":10694}
\ No newline at end of file
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":false,"pivot":{"x":2.820615768432617,"y":5.695123672485352,"z":27.234046936035158},"rotation":{"x":-0.259620726108551,"y":0.6331271529197693,"z":-0.23853585124015809,"w":-0.6890919804573059},"size":26.649621963500978,"orthographic":false}
\ No newline at end of file
{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":false,"pivot":{"x":5.480308532714844,"y":3.003549575805664,"z":25.396705627441408},"rotation":{"x":-0.2950100600719452,"y":0.6447432041168213,"z":-0.2974981963634491,"w":-0.6393514275550842},"size":33.21027755737305,"orthographic":false}
\ No newline at end of file
Base path: C:/Program Files/Unity/Editor/Data
Cmd: initializeCompiler
Cmd: initializeCompiler
Cmd: initializeCompiler
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