コード例 #1
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
 public void UnsubscribeToGyroscopeData(int myoId, EventHandler <GyroscopeDataEventArgs> handler)
 {
     if (myoId < 0 || myoId >= Myos.Count)
     {
         return;
     }
     Myos.ElementAt(myoId).GyroscopeDataAcquired -= handler;
 }
コード例 #2
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
 public void UnsubscribeToAccelerometerData(int myoId, EventHandler <AccelerometerDataEventArgs> handler)
 {
     if (myoId < 0 || myoId >= Myos.Count)
     {
         return;
     }
     Myos.ElementAt(myoId).AccelerometerDataAcquired -= handler;
 }
コード例 #3
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
 public void UnsubscribeToOrientationData(int myoId, EventHandler <OrientationDataEventArgs> handler)
 {
     if (myoId < 0 || myoId >= Myos.Count)
     {
         return;
     }
     Myos.ElementAt(myoId).OrientationDataAcquired -= handler;
 }
コード例 #4
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
 public void Unlock(UnlockType type, int myoId = 0)
 {
     if (myoId < 0 || myoId >= Myos.Count)
     {
         return;
     }
     Myos.ElementAt(myoId).Unlock(type);
 }
コード例 #5
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
 public void Lock(int myoId = 0)
 {
     if (myoId < 0 || myoId >= Myos.Count)
     {
         return;
     }
     Myos.ElementAt(myoId).Lock();
 }
コード例 #6
0
ファイル: MyoManager.cs プロジェクト: Hellyon/MyoGame
        //public event EventHandler<OrientationDataEventArgs> OrientationDataAcquired;

        //public event EventHandler<AccelerometerDataEventArgs> AccelerometerDataAcquired;

        //public event EventHandler<GyroscopeDataEventArgs> GyroscopeDataAcquired;

        public void Vibrate(VibrationType vibrationType = VibrationType.Short, int myoId = 0)
        {
            if (myoId < 0 || myoId >= Myos.Count)
            {
                return;
            }
            Myos.ElementAt(myoId).Vibrate(vibrationType);
        }