Пример #1
0
        /// <summary>
        /// Let go the current bone being dragged.
        /// </summary>
        public void LetGoBone()
        {
            if (m_oDraggedBone == null)
            {
                if (AppConstants.VerboseLogging)
                {
                    Debug.Log("No bone to let go");
                }
                return;
            }

            m_oDraggedBone.LetGo();
            m_oDraggedBone = null;
        }
Пример #2
0
        /// <summary>
        /// Drag a bone around.
        /// </summary>
        public void DragBone()
        {
            GameObject _oBone = get();

            if (m_oDraggedBone != null || _oBone == null || m_iTotalBones_Local <= 0)
            {
                if (AppConstants.VerboseLogging)
                {
                    Debug.Log("Can't drag bones");
                }
                return;
            }

            DecreaseBonesNumber();

            _oBone.SetActive(true);
            m_oDraggedBone = _oBone.GetComponent <BoneBehaviour>();
            m_oDraggedBone.Drag();
            m_oAnturaBehaviour.AddBone(_oBone);
        }