// 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)
 {
     PlayerTransform = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
     monsterScale    = animator.transform.GetComponent <MonsterScale>();
 }
Пример #2
0
 /// <summary>
 /// Sets the scale of the camera based on the given monster scale.
 /// </summary>
 public void SetCameraScale(MonsterScale scale)
 {
     freeLook.m_Orbits[0] = cameraProperties[scale].topRig;
     freeLook.m_Orbits[1] = cameraProperties[scale].midRig;
     freeLook.m_Orbits[2] = cameraProperties[scale].botRig;
 }