예제 #1
0
 protected void initGesture()
 {
     _listActiveGestures = new Dictionary <GestureTypes, object> ();
     foreach (Transform t in transform)
     {
         BehaviorHand hand = t.GetComponent <BehaviorHand> ();
         if (hand != null)
         {
             hand.SetPlayerTransform(player);
             foreach (GestureTypes type in Enum.GetValues(typeof(GestureTypes)))
             {
                 if (hand.GetCurrentType() == type && !_listActiveGestures.ContainsKey(type))
                 {
                     if (type == GestureTypes.RotateHonz || type == GestureTypes.RotateVert)
                     {
                         _listActiveGestures.Add(GestureTypes.RotateHonz, t.GetComponent <BehaviorHand> () as object);
                         _listActiveGestures.Add(GestureTypes.RotateVert, t.GetComponent <BehaviorHand> () as object);
                     }
                     else
                     {
                         _listActiveGestures.Add(type, t.GetComponent <BehaviorHand> () as object);
                     }
                 }
             }
             t.GetComponent <BehaviorHand> ().Init(this);
         }
     }
 }
예제 #2
0
        protected void unBlockGesture(GestureTypes type)
        {
            BehaviorHand behavior = (BehaviorHand)_listActiveGestures [type];

            behavior.UnBlockGesture();
        }
예제 #3
0
        protected void unBlockCurrentGesture()
        {
            BehaviorHand behavior = (BehaviorHand)_listActiveGestures [_currentType];

            behavior.UnBlockGesture();
        }