public ASDFGInput(Game game) : base(game) { _keyRange = 5; keyboardState = new KeyboardState(); states = new KeyState[_keyRange]; otherStates = new KeyState[(int)OtherKeyType.EndType]; explosion = new ExplosionParticleSystem(game, 100); game.Components.Add(explosion); }
public GuitarInput(Game game) : base(game) { _keyRange = 5; gamepadState = new GamePadState(); pressedButtons = new ButtonState[_keyRange]; pressedOthers = new ButtonState[(int)OtherKeyType.EndType]; pressedStrum = new ButtonState[2]; states = new KeyState[_keyRange]; otherStates = new KeyState[(int)OtherKeyType.EndType]; explosion = new ExplosionParticleSystem(game, 100); game.Components.Add(explosion); }
public GuitarASDFG(InputManager input, Game game) : base(game, input) { explosion = new ExplosionParticleSystem(game, 100); game.Components.Add(explosion); draw_pressed = new bool[5]; for (int i = 0; i < 5; i++) { draw_pressed[i] = false; } long_pressed = new LightningBolt[itemCount]; long_pressed_vis = new bool[itemCount]; for (int i = 0; i < itemCount; i++) { long_pressed_vis[i] = false; } LightningDescriptor ld = new LightningDescriptor(); ld.Topology.Clear(); ld.Topology.Add(LightningSubdivisionOp.Jitter); ld.Topology.Add(LightningSubdivisionOp.Jitter); ld.Topology.Add(LightningSubdivisionOp.Jitter); ld.ForkForwardDeviation = new Range(-1, 1); ld.ForkLengthPercentage = 0.6f; ld.ExteriorColor = Color.Blue; ld.JitterDeviationRadius = 0.1f; ld.JitterDecayRate = 1.0f; ld.IsGlowEnabled = true; ld.GlowIntensity = 3.0f; ld.BaseWidth = 0.2f; long_pressed[0] = new LightningBolt(game, new Vector3(0, 12, 0), new Vector3(0, -10, 0), ld); long_pressed[1] = new LightningBolt(game, new Vector3(0, 12, 0), new Vector3(0, -10, 0), ld); long_pressed[2] = new LightningBolt(game, new Vector3(0, 12, 0), new Vector3(0, -10, 0), ld); long_pressed[3] = new LightningBolt(game, new Vector3(0, 12, 0), new Vector3(0, -10, 0), ld); long_pressed[4] = new LightningBolt(game, new Vector3(0, 12, 0), new Vector3(0, -10, 0), ld); // 3D stuff Vector3 pos = new Vector3(0, 0, 5); Vector3 target = new Vector3(0, 0, 0); view = Matrix.CreateLookAt(pos, target, Vector3.Up); projection = Matrix.CreatePerspectiveFieldOfView( MathHelper.PiOver4, (float)Game.Window.ClientBounds.Width / (float)Game.Window.ClientBounds.Height, 1, 7); rotation = -(MathHelper.PiOver4 + MathHelper.PiOver4 / 2); // Initialize vertices fret = new VertexPositionTexture[4]; fret[0] = new VertexPositionTexture(new Vector3(-0.8f, 3, 0), new Vector2(0, 0)); fret[1] = new VertexPositionTexture(new Vector3(0.8f, 3, 0), new Vector2(1, 0)); fret[2] = new VertexPositionTexture(new Vector3(-0.8f, -3, 0), new Vector2(0, 1)); fret[3] = new VertexPositionTexture(new Vector3(0.8f, -3, 0), new Vector2(1, 1)); // Initialize vertices guitar_string = new VertexPositionTexture[4]; guitar_string[0] = new VertexPositionTexture(new Vector3(-0.01f, 3, 0.01f), new Vector2(0, 0)); guitar_string[1] = new VertexPositionTexture(new Vector3(0.01f, 3, 0.01f), new Vector2(1, 0)); guitar_string[2] = new VertexPositionTexture(new Vector3(-0.01f, -2.3f, 0.01f), new Vector2(0, 1)); guitar_string[3] = new VertexPositionTexture(new Vector3(0.01f, -2.3f, 0.01f), new Vector2(1, 1)); // Initialize vertices bar = new VertexPositionTexture[4]; bar[0] = new VertexPositionTexture(new Vector3(-0.8f, 0.02f, 0.007f), new Vector2(0, 0)); bar[1] = new VertexPositionTexture(new Vector3(0.8f, 0.02f, 0.007f), new Vector2(1, 0)); bar[2] = new VertexPositionTexture(new Vector3(-0.8f, -0.02f, 0.007f), new Vector2(0, 1)); bar[3] = new VertexPositionTexture(new Vector3(0.8f, -0.02f, 0.007f), new Vector2(1, 1)); // Initialize long notes long_note = new VertexPositionTexture[4]; fret_y_1 = 0.0f; fret_y_2 = 6.0f; }