Пример #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         if (Instance != this)
         {
             DestroyImmediate(gameObject);
         }
     }
     Init();
 }
Пример #2
0
        public void AttachFingerRotationManager(bool isRight, IFingerRotationManager[] fingers)
        {
            IsRight = isRight;
            _curHandRotationNormalized = new HandRotationNormalizedInfo();
            int n = fingers.Length;

            if (n != 5)
            {
                Debug.LogError("Finger length is incorrect.");
                return;
            }
            _fingers = new IFingerRotationManager[n];
            for (int i = 0; i < n; i++)
            {
                _fingers[i] = fingers[i];
            }
            _handPoseConditionManager = HandPoseConditionManager.Instance;
            Pose = HandPoseType.Normal;
        }