Commits

Ivan Vučica committed 673d2bc Merge

Merge

  • Participants
  • Parent commits 0b186fa, 81aa069

Comments (0)

Files changed (2)

File gm_level.cpp

         playership->keyDown(event);
         break;
 
+        case SDLK_UP:
+        playership->keyDown(event);
+        break;
+
+        case SDLK_DOWN:
+        playership->keyDown(event);
+        break;
+
         default:
         GameMode::keyDown(event);
         break;

File playership.cpp

 void
 PlayerShip::keyDown(const SDL_Event &event)
 {
+    int lasty = y;
+    if(y < 145)
+        y = lasty +5;
+    if(y > 300)
+        y = lasty -5;
     switch(event.key.keysym.sym)
     {
         case SDLK_RIGHT:
         angleV = -playerShipAngleV;
         break;
 
+        case SDLK_UP:
+        y = y - 5;
+        break;
+
+        case SDLK_DOWN:
+        y = y + 5;
+        break;
+
         default:
         break;
     }