void m_keysSteering_KeyEvent(KeyEventArgs e, bool bDown) { if (!bDown) { return; } if (m_keysSteering.GetActionForKey(e.KeyCode) == "shoot") { LaunchBall(); } }
private void m_keysSteering_KeyEvent(System.Windows.Forms.KeyEventArgs e, bool bDown) { if (!bDown) { return; } if (m_keysSteering.GetActionForKey(e.KeyCode) == "shoot") { Shot shot = new Shot(m_gameMain); EPointF pntVel = new EPointF((float)Math.Sin(Rotation), -(float)Math.Cos(Rotation)) * 5; shot.Velocity = pntVel + Velocity; shot.Loc = this.Loc; } }