Skip to content
Snippets Groups Projects
Commit 3dec4064 authored by Aji Andhika Falah's avatar Aji Andhika Falah
Browse files

fix: pet move

parent 9c026998
Branches
Tags
No related merge requests found
...@@ -6,7 +6,7 @@ using System.Linq; ...@@ -6,7 +6,7 @@ using System.Linq;
public class PetAttack : MonoBehaviour public class PetAttack : MonoBehaviour
{ {
public float timeBetweenAttacks = 0.5f; public float timeBetweenAttacks = 0.5f;
public int attackDamage = 10; public int attackDamage = 3;
Animator anim; Animator anim;
GameObject player; GameObject player;
......
...@@ -21,6 +21,7 @@ public class PetMovePassive : MonoBehaviour ...@@ -21,6 +21,7 @@ public class PetMovePassive : MonoBehaviour
{ {
if(other.gameObject == player) if(other.gameObject == player)
{ {
nav.enabled = false;
move = false; move = false;
} }
} }
...@@ -29,6 +30,7 @@ public class PetMovePassive : MonoBehaviour ...@@ -29,6 +30,7 @@ public class PetMovePassive : MonoBehaviour
{ {
if(other.gameObject == player) if(other.gameObject == player)
{ {
nav.enabled = true;
move = true; move = true;
} }
} }
......
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