Ejemplo n.º 1
0
        private void Start()
        {
            m_animator = GetComponent <Animator>();
            AnimatorStateInfo state = m_animator.GetCurrentAnimatorStateInfo(0);

            m_shortNameHash = state.shortNameHash;
            m_ferry         = m_animator.GetComponent <GameFerry>();
        }
        private void Start()
        {
            Transform parent = transform.parent;

            while (parent != null)
            {
                GameFerry ferry = parent.GetComponentInChildren <GameFerry>(true);
                if (ferry != null)
                {
                    m_ferryAnimator = ferry.GetComponent <Animator>();
                    break;
                }

                parent = parent.parent;
            }

            m_buttonAnimator = GetComponent <Animator>();
            m_forwardBool    = Animator.StringToHash("Forward");
            m_pushBool       = Animator.StringToHash("Push");
        }