// 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) //{ //} // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // //} //OnStateExit is called when a transition ends and the state machine finishes evaluating this state override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { GunAndMeleeSystem fightingSystem = animator.transform.root.GetComponent <GunAndMeleeSystem>(); if (slashType == SlashEventType.DealDamage) { fightingSystem.DoSlashDamage(); } else if (slashType == SlashEventType.EndSlash) { fightingSystem.EndSlash(); } }
// Use this for initialization void Start() { fightSystem = transform.root.GetComponent <GunAndMeleeSystem>(); }
// 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) { // //} // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // //} ////OnStateExit is called when a transition ends and the state machine finishes evaluating this state override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { GunAndMeleeSystem fightingSystem = animator.transform.root.GetComponent <GunAndMeleeSystem>(); fightingSystem.allowShot = true; }
//private Journal journal; // Use this for initialization void Start() { fightingSystem = transform.root.GetComponent <GunAndMeleeSystem>(); //journal = transform.root.GetComponent<Journal>(); }