// 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) { pSysteme = animator.GetComponent <PorteSystem>(); //pSysteme.OpenDoor(); }
private void Start() { instance = this; mesh = gameObject.GetComponent <MeshRenderer>(); animator = GetComponent <Animator>(); }