コード例 #1
0
 // 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)
 {
     base.OnStateEnter(animator, stateInfo, layerIndex);
     m_ToothyAIBossController = m_AIBossController.GetComponent <ToothyAIBossController>();
     m_ToothyAIBossController.RotateTowards(m_Player.transform);
     m_ToothyAIBossController.transform.LookAt(m_Player.transform);
 }
コード例 #2
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     base.OnStateUpdate(animator, stateInfo, layerIndex);
     if (stateInfo.normalizedTime < .1f)
     {
         m_ToothyAIBossController.RotateTowards(m_Player.transform);
     }
 }
コード例 #3
0
 // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     base.OnStateUpdate(animator, stateInfo, layerIndex);
     m_ToothyAIBossController.RotateTowards(m_Player.transform);
     // m_ToothyAIBossController.transform.LookAt(m_Player.transform);
 }