コード例 #1
0
        /// <summary>
        /// Deactivates the motion on the specified target
        /// </summary>
        /// <param name="rTarget">GameObject to activate the motion on</param>
        /// <returns>Bool that determines if the motion was activated</returns>
        public void ActivateInstance(GameObject rTarget)
        {
            MotionController lMotionController = rTarget.GetComponent <MotionController>();

            if (lMotionController != null)
            {
                MotionControllerMotion lMotion = lMotionController.ActiveMotion;
                if (lMotion != null && (lMotion.Name == _MotionName || lMotion.GetType().Name == _MotionName))
                {
                    lMotion.Deactivate();
                }
            }
        }