Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Ship(Texture2D shipsheet, Rectangle hitbox, Rectangle sourceRectangle, bool rotated)
- ships = new Ship[5];
- Rectangle shipHitbox;
- for (int i = 0; i < ships.GetLength(0); i++)
- {
- int x = Rand(0, 9) * 60;
- int y = Rand(0, 9) * 60;
- shipHitbox = new Rectangle(x, y, 60 + (60 * i), 60);
- shipSourceRectangle = new Rectangle(0, (60 * i), 60 + (60 * i), 60);
- rotated = random.Next(2) == 0 ? false : true;
- ships[i] = new Ship(shipsheet, shipHitbox, shipSourceRectangle, rotated);
- }
Add Comment
Please, Sign In to add comment