Beispiel #1
0
    /// <summary>
    /// Determines whether a motion is satisfied.
    /// </summary>
    /// <returns><c>true</c> if the motion with motionName is satisfied; otherwise, <c>false</c>.</returns>
    /// <param name="motionName">Motion name.</param>
    public bool IsMotion(string motionName, bool isLeftHand = true)
    {
        // If not enabled, just return false.
        if (!isEnabled)
        {
            return(false);
        }

        if (handMotionList.ContainsKey(motionName))
        {
            HandMotion hm = handMotionList [motionName];

            // Debug.Log ("Action:Prepare Match");
            if (isLeftHand)
            {
                return(hm.Match(leftHandList));
            }
            else
            {
                return(hm.Match(rightHandList));
            }
        }
        return(false);
    }