Beispiel #1
0
 void m_keysSteering_KeyEvent(KeyEventArgs e, bool bDown)
 {
     if (!bDown)
     {
         return;
     }
     if (m_keysSteering.GetActionForKey(e.KeyCode) == "shoot")
     {
         LaunchBall();
     }
 }
Beispiel #2
0
        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;
            }
        }