*
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class GunStateSensor : StateMachineBehaviour {
|
||||
|
||||
public override void OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
var controller = animator.GetComponent<PlayerController>();
|
||||
if(controller != null){
|
||||
controller.OnAnimationGunArmed(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnStateExit (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
||||
{
|
||||
var controller = animator.GetComponent<PlayerController>();
|
||||
if(controller != null){
|
||||
controller.OnAnimationGunArmed(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user