Пример #1
0
    public void AdvancePatternOrigin()
    {
        switch (Origin)
        {
        case PatternOrigin.LeftHand:
            Origin = (PatternOrigin.RightHand);
            break;

        case PatternOrigin.RightHand:
            Origin = (PatternOrigin.LeftHand);
            break;

        case PatternOrigin.User:
            Origin = (PatternOrigin.LeftHand);
            break;
        }
    }
Пример #2
0
    public void SetPatternOrigin(PatternOrigin origin)
    {
        switch (origin)
        {
        case PatternOrigin.LeftHand:
            if (Left != null)
            {
                Left.SetActive(true);
            }
            //if (Right != null)
            //Right.SetActive(false);
            //if (User != null)
            //User.SetActive(false);
            break;

        case PatternOrigin.RightHand:
            //if (Left != null)
            //Left.SetActive(false);
            if (Right != null)
            {
                Right.SetActive(true);
            }
            //if (User != null)
            //User.SetActive(false);
            break;

        case PatternOrigin.User:
            //if (Left != null)
            //Left.SetActive(false);
            //if (Right != null)
            //Right.SetActive(false);
            if (User != null)
            {
                User.SetActive(true);
            }
            break;
        }
    }