Ejemplo n.º 1
0
 void HandleWiiremoteAccelerationUpdate(object sender, WiiAccelerationUpdateEventArgs e)
 {
     LayoutRoot.Dispatcher.BeginInvoke(()=>{
         WiiPitchAngle.Angle = e.Pitch;
         WiiRollAngle.Angle = e.Roll;
     });
 }
Ejemplo n.º 2
0
        void _wiimotelistener_AccelerationUpdate(object sender, WiiAccelerationUpdateEventArgs args)
        {
            double x = args.Roll / 10;
            double y = args.Pitch;
            double z = args.Yaw;

            _cursortr.Delay = 0.1;

            this.Dispatcher.BeginInvoke(() =>
            {
                Point t = _cursortr.Translate;
                if (t.X + (x * 1.5) > 0 && t.X + (x * 1.5) < this.Width - 200)
                {
                    _cursortr.Translate = new Point(t.X + (x * 1.5), t.Y);
                }
                _cursortr.Angle = x;
            });
        }