Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. //init galaxians
  2.     for (int y = 0; y < ENEMYHEIGHT; y++)
  3.     {
  4.         for (int x = 0; x < ENEMYWIDTH; x++)
  5.         {
  6.             if (level1[y][x] == 'p')
  7.                 galaxians[y][x] = new Galaxian(images->privateer, screen->GetWidth());
  8.             else if (level1[y][x] == 'm')
  9.                 galaxians[y][x] = new Galaxian(images->major, screen->GetWidth());
  10.             else if (level1[y][x] == 'c')
  11.                 galaxians[y][x] = new Galaxian(images->colonel, screen->GetWidth());
  12.             else if (level1[y][x] == 'g')
  13.                 galaxians[y][x] = new Galaxian(images->general, screen->GetWidth());
  14.             else
  15.                 galaxians[y][x] = NULL;
  16.  
  17.             if (galaxians[y][x] != NULL)
  18.             {
  19.                 galaxians[y][x]->position = vec2(60 + 25 * x, 30 + 25 * y);
  20.                 galaxians[y][x]->velocity = vec2(1, 0);
  21.             }
  22.         }
  23.     }
  24.  
  25.     galaxians[2][9]->state = PrepareArcMovement;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement