public override void Gamepad(GamePadState state, GamePadState oldState) { _start.X += state.ThumbSticks.Left.X / 5; _start.Y += state.ThumbSticks.Left.Y / 5; _end.X += state.ThumbSticks.Right.X / 5; _end.Y += state.ThumbSticks.Right.Y / 5; if (state.Buttons.A == ButtonState.Pressed && oldState.Buttons.A == ButtonState.Released) { CuttingTools.Cut(World, _start, _end); } base.Gamepad(state, oldState); }
public override void Gamepad(InputState input) { _start.X += input.GamePadState.ThumbSticks.Left.X / 5; _start.Y += input.GamePadState.ThumbSticks.Left.Y / 5; _end.X += input.GamePadState.ThumbSticks.Right.X / 5; _end.Y += input.GamePadState.ThumbSticks.Right.Y / 5; if (input.IsButtonPressed(Buttons.A)) { CuttingTools.Cut(World, _start, _end); } base.Gamepad(input); }
internal void Explosion(Vector2 loc) { CuttingTools.Cut(world, loc + Vector2.UnitX + Vector2.UnitY, loc - Vector2.UnitX - Vector2.UnitY, 0.01f); CuttingTools.Cut(world, loc - Vector2.UnitX + Vector2.UnitY, loc + Vector2.UnitX - Vector2.UnitY, 0.01f); }