Compare commits
No commits in common. "d5b6dee74f412be61b80af77320017d8cf062bd6" and "0e2e1cf93cd0bcf929abe7b647d4c315ef2ca744" have entirely different histories.
d5b6dee74f
...
0e2e1cf93c
2 changed files with 14 additions and 5 deletions
|
@ -1,4 +0,0 @@
|
||||||
# Attributes and Credits
|
|
||||||
``` text
|
|
||||||
"Red Emergency Stop Button" (https://skfb.ly/oQOG7) by Cry11y is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
|
|
||||||
```
|
|
|
@ -18,6 +18,10 @@ public class NpcMovementRework : MonoBehaviour
|
||||||
public NavMeshAgent agent;
|
public NavMeshAgent agent;
|
||||||
|
|
||||||
public Transform desk;
|
public Transform desk;
|
||||||
|
public float walkRange;
|
||||||
|
public LayerMask waitingArea;
|
||||||
|
public LayerMask despawnArea;
|
||||||
|
public Vector3 roamingPoint;
|
||||||
public Animator animator;
|
public Animator animator;
|
||||||
private static readonly int IsSitting = Animator.StringToHash("isSitting");
|
private static readonly int IsSitting = Animator.StringToHash("isSitting");
|
||||||
private static readonly int Speed = Animator.StringToHash("Speed");
|
private static readonly int Speed = Animator.StringToHash("Speed");
|
||||||
|
@ -51,7 +55,16 @@ public class NpcMovementRework : MonoBehaviour
|
||||||
agent.SetDestination(desk.position);
|
agent.SetDestination(desk.position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Wait()
|
||||||
|
{
|
||||||
|
Debug.Log("walking");
|
||||||
|
if (animator.GetBool(IsSitting))
|
||||||
|
{
|
||||||
|
animator.SetBool(IsSitting,false);
|
||||||
|
}
|
||||||
|
agent.SetDestination(roamingPoint);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerator SitDown()
|
public IEnumerator SitDown()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue