Rev 836 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 836 | chris | 1 | package com.gebauz.burutaru; |
| 2 | |||
| 985 | chris | 3 | import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver; |
| 836 | chris | 4 | import com.gebauz.bauzoid.game.Game.IGameFactory; |
| 5 | import com.gebauz.bauzoid.app.BauzoidApp; |
||
| 985 | chris | 6 | import com.gebauz.burutaru.game.level.LevelData; |
| 7 | import com.gebauz.burutaru.game.level.LevelDataAsyncLoader; |
||
| 836 | chris | 8 | |
| 9 | public class BurutaruApp extends BauzoidApp |
||
| 10 | { |
||
| 11 | |||
| 12 | // Constants======================================================================================== |
||
| 13 | |||
| 14 | // Embedded Types=================================================================================== |
||
| 15 | |||
| 16 | // Fields=========================================================================================== |
||
| 17 | |||
| 18 | // Methods========================================================================================== |
||
| 19 | |||
| 20 | public BurutaruApp(boolean adsEnabled) |
||
| 21 | { |
||
| 22 | this(adsEnabled, null); |
||
| 23 | } |
||
| 24 | |||
| 25 | public BurutaruApp(boolean adsEnabled, IGameFactory gameFactory) |
||
| 26 | { |
||
| 27 | super("Burutaru Z", adsEnabled, gameFactory); |
||
| 28 | } |
||
| 29 | |||
| 30 | @Override |
||
| 31 | public void initGame() |
||
| 32 | { |
||
| 33 | // Global initializations |
||
| 34 | mGame.setCustomServices(new BurutaruCustomServices(mGame)); |
||
| 35 | |||
| 36 | mGame.getInput().setVirtualSize(GameConsts.VIRTUAL_SCREEN_WIDTH, GameConsts.VIRTUAL_SCREEN_HEIGHT); |
||
| 37 | |||
| 38 | mGame.getGameStateManager().setDefaultPackage(this.getClass().getPackage().getName() + ".gamestates"); |
||
| 39 | mGame.getGameStateManager().setLoadingScreen(new LoadingScreen(mGame)); |
||
| 40 | |||
| 41 | String initialState = mGame.getSettings().getSetting("initstate"); |
||
| 42 | String stateParams = mGame.getSettings().getSetting("state_param"); |
||
| 43 | mGame.getGameStateManager().switchTo(initialState, stateParams); |
||
| 44 | |||
| 45 | // Global sounds. |
||
| 46 | /*mGame.getAudio().newManagedSound("data/sounds/menu_push.wav"); |
||
| 47 | mGame.getAudio().newManagedSound("data/sounds/menu_click.wav"); |
||
| 48 | mGame.getAudio().newManagedSound("data/sounds/menu_confirm.wav");*/ |
||
| 985 | chris | 49 | |
| 50 | // Game-specific asynchronous asset loaders |
||
| 51 | mGame.getAssetManager().setLoader(LevelData.class, new LevelDataAsyncLoader(new InternalFileHandleResolver())); |
||
| 836 | chris | 52 | } |
| 53 | |||
| 54 | @Override |
||
| 55 | public void exitGame() |
||
| 56 | { |
||
| 57 | } |
||
| 58 | |||
| 59 | @Override |
||
| 60 | public void render() |
||
| 61 | { |
||
| 62 | super.render(); |
||
| 63 | |||
| 64 | } |
||
| 65 | |||
| 66 | // Getters/Setters================================================================================== |
||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | } |