示例#1
1
 protected virtual void OnFingerOpened(Finger finger)
 {
     var handler = FingerOpened;
     if (handler != null) handler(finger, new EventArgs());
 }
示例#2
0
 public Hand(Side side)
 {
     Thumb = new Finger(FingerKind.Thumb);
     Index = new Finger(FingerKind.Index);
     Middle = new Finger(FingerKind.Middle);
     Ring = new Finger(FingerKind.Ring);
     Pinky = new Finger(FingerKind.Pinky);
     Side = side;
     var fingers = GetAllFingers();
     fingers.ForEach(f => f.Opened += (s, a) => OnFingerOpened(f));
     fingers.ForEach(f => f.Closed += (s, a) => OnFingerClosed(f));
 }
示例#3
0
 public Hand(Side side) {
     Thumb = new Finger(FingerKind.Thumb);
     Index = new Finger(FingerKind.Index);
     Middle = new Finger(FingerKind.Middle);
     Ring = new Finger(FingerKind.Ring);
     Pinky = new Finger(FingerKind.Pinky);
     Side = side;
     var fingers = GetAllFingers();
     foreach (var finger in fingers) {
         var f = finger;
         finger.Opened += (s, a) => OnFingerOpened(f);
         finger.Closed += (s, a) => OnFingerClosed(f);
     }
 }