public void UsePath(PathSample[] _path, System.Action <PersonBehavior> callback) { endPathCallback = callback; curNode = 1; moveMode = PersonMoveMode.Path; path = _path; agent.SetDestination(path [1].position); active = true; }
public void Wander() { agent.autoBraking = false; start = Random.value * 1000f; float y = Random.value * 360f; Vector3 euler = myTransform.eulerAngles; euler.y = y; myTransform.eulerAngles = euler; moveMode = PersonMoveMode.Wander; active = true; }