public void OnStickEventReceived(StickEventArgs stick_event) { //Logger.Log(stick_event); ls_x = stick_event.StickStatus.X; ls_y = stick_event.StickStatus.Y; rs_x = stick_event.StickStatus.RX; rs_y = stick_event.StickStatus.RY; // Left Stick if (Math.Abs(ls_x - 32767) < 5000 && Math.Abs(ls_y - 32767) < 5000) { Keyboard.KeyPress(VK.VK_S); //Mouse.Move(1920/2,1080/2); } else { double px = (ls_x / 65535.0) * DeviceUtils.ScreenSizeX * 0.5 * (DeviceUtils.ScreenSizeY / DeviceUtils.ScreenSizeX) + (0.5 * DeviceUtils.ScreenSizeX - 0.25 * DeviceUtils.ScreenSizeY); double py = (ls_y / 65535.0) * DeviceUtils.ScreenSizeY * 0.5 + 0.25 * DeviceUtils.ScreenSizeY; Mouse.RightClick((int)px, (int)py); } // Right Stick if (Math.Abs(rs_x - 32767) > 500 || Math.Abs(rs_y - 32767) > 500) { Shifting = true; } else { Shifting = false; } }
public void OnStickRemoved(DynamiteGame sender, StickEventArgs e) { audio.PlaySound(32); }
private void OnStickRemoved(DynamiteGame sender, StickEventArgs e) { Record(new StickRemoval(e.HoleIndex, e.Stick.Index, e.Stick.Holes, e.Stick.Grooves, e.Stick.Length, e.Stick.Weight)); }
public void OnStickInserted(DynamiteGame sender, StickEventArgs e) { audio.PlaySound(31); }
private void OnStickMoved(object sender, StickEventArgs e) { log.Debug("StickMoved controller #" + e.Controller + " with side=" + e.Side + ", direction=" + e.Direction + ", x=" + e.X + ", y=" + e.Y); }
public void OnStickRemoved(DynamiteGame sender, StickEventArgs e) { UpdateHoleLabel(e.HoleIndex, -1); }
public void OnStickInserted(DynamiteGame sender, StickEventArgs e) { UpdateHoleLabel(e.HoleIndex, e.Stick.Index); }
private void onStickRemoved(DynamiteGame sender, StickEventArgs e) { Statistics.dynamiteStickRemovals++; Statistics.dynamiteSticksInHoles--; }
private void onStickInserted(DynamiteGame sender, StickEventArgs e) { Statistics.dynamiteStickInsertions++; Statistics.dynamiteSticksInHoles++; }