void Start() { controller = GetComponent <CharacterController>(); animator = GetComponentInChildren <AnimatorBridge>(); line = GetComponent <LineRenderer>(); line.enabled = false; ToggleJoystick(false); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (!animatorBridge) { animatorBridge = FindObjectOfType <AnimatorBridge>(); } foreach (AnimLock animLock in animLocks) { if (animLock.lockAnimation) { animatorBridge.CancelTrigger(animLock.name); animatorBridge.SetLock(animLock.name, true); } } }
void Start() { controller = GetComponent <CharacterController>(); animator = GetComponentInChildren <AnimatorBridge>(); }