June 2015
Intermediate to advanced
388 pages
7h 31m
English
In three simple steps, we will be able to glimpse our spaceship:
SpaceShip object to the GameManager member variables:private boolean playing = false; // Our first game object SpaceShip ship; int screenWidth;
SpaceShip() to the createObjects method:private void createObjects() {
// Create our game objects
// First the ship in the center of the map
gm.ship = new SpaceShip(gm.mapWidth / 2, gm.mapHeight / 2);
}draw method of AsteroidsRenderer:// Start drawing! // Draw the ship gm.ship.draw(viewportMatrix);
Run the game and see the output:

Not exactly ...
Read now
Unlock full access