Rev 1052 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1052 | chris | 1 | package com.gebauz.darts2go; |
| 2 | |||
| 3 | import com.gebauz.bauzoid.app.CustomServices; |
||
| 4 | import com.gebauz.bauzoid.game.Game; |
||
| 5 | import com.gebauz.bauzoid.graphics.Font; |
||
| 6 | |||
| 7 | /** Provides the global font, etc. */ |
||
| 8 | public class Darts2GoCustomServices extends CustomServices |
||
| 9 | { |
||
| 10 | private Font mInGameFont = null; |
||
| 1067 | chris | 11 | private Font mScoreFont = null; |
| 1052 | chris | 12 | |
| 13 | static Darts2GoCustomServices mInstance = null; |
||
| 14 | |||
| 15 | public Darts2GoCustomServices(Game game) |
||
| 16 | { |
||
| 17 | super(game); |
||
| 18 | |||
| 19 | mInstance = this; |
||
| 20 | } |
||
| 21 | |||
| 22 | @Override |
||
| 23 | public void init() |
||
| 24 | { |
||
| 25 | mInGameFont = getGame().getFonts().loadFont("data/fonts/ingame.bzf"); |
||
| 1067 | chris | 26 | mScoreFont = getGame().getFonts().loadFont("data/fonts/score.bzf"); |
| 1052 | chris | 27 | } |
| 28 | |||
| 29 | @Override |
||
| 30 | public void exit() |
||
| 31 | { |
||
| 32 | mInGameFont = null; |
||
| 1067 | chris | 33 | mScoreFont = null; |
| 1052 | chris | 34 | } |
| 35 | |||
| 36 | @Override |
||
| 37 | public void update(float deltaTime) |
||
| 38 | { |
||
| 39 | } |
||
| 40 | |||
| 41 | @Override |
||
| 42 | public void render() |
||
| 43 | { |
||
| 44 | } |
||
| 45 | |||
| 46 | public Font getFont() |
||
| 47 | { |
||
| 48 | return mInGameFont; |
||
| 49 | } |
||
| 50 | |||
| 1067 | chris | 51 | public Font getScoreFont() |
| 1052 | chris | 52 | { |
| 1067 | chris | 53 | return mScoreFont; |
| 1052 | chris | 54 | } |
| 55 | |||
| 56 | public static Darts2GoCustomServices getInstance() |
||
| 57 | { |
||
| 58 | return mInstance; |
||
| 59 | } |
||
| 60 | |||
| 61 | } |