If we want to be in space, we will need to give our players a bit of context. We may want to add something similar to a SkyDome that represents where we are.
As mentioned before, there's a number of different ways to get 3D models. We will take the one SkyDome that is in the LibGDX tests, but you can model your own if you want and add your own charm.
Or you can get it from our repository
(https://github.com/DeeepGames/SpaceGladiators/tree/Prototype/android/assets).
After pasting the files in the Assets
folder, let's make the additions for the dome. Let's make the following changes to GameWorld.java
:
public class GameWorld { ... private Entity dome; ... private void loadLevel() { ... engine.addEntity(dome = EntityFactory.loadDome(0, 0, 0)); playerSystem.dome = dome; } }
We will need a new global variable called dome
. In loadLevel()
method, add a new...