コード例 #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>();
        }
コード例 #2
0
        private void Start()
        {
            Transform parent = transform.parent;

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

                parent = parent.parent;
            }

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