void OnFloorClicked(Vector3 pos) { if (state == states.CHANGING_LEVEL) { return; } if (state == states.ENTERING_DOOR) { return; } if (state == states.UI_POPUP) { return; } else if (state == states.OPENING_FRUIT_NINJA) { state = states.PLAYING; } target.transform.position = pos; LookAtTarget(target); Vector3 rot = transform.localEulerAngles; rot.x = rot.z = 0; transform.localEulerAngles = rot; moveTo.Init(pos); anim.Walk(); }
void WalkTo(Vector3 pos) { target.transform.position = pos; LookAtTarget(target); Vector3 rot = transform.localEulerAngles; rot.x = rot.z = 0; transform.localEulerAngles = rot; moveTo.Init(pos); view.characterAnimations.Walk(); }