Rev 523 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package com.gebauz.PonPonChun;
import com.gebauz.Bauzoid.app.CustomServices;
import com.gebauz.Bauzoid.game.Game;
import com.gebauz.Bauzoid.graphics.Font;
/** Provides the global font, etc. */
public class PonPonChunCustomServices
extends CustomServices
{
//private Font mFont = null;
private Font mInGameFont =
null;
private Font mScoringFont =
null;
//private MusicPlayer mMusicPlayer = null;
static PonPonChunCustomServices mInstance =
null;
public PonPonChunCustomServices
(Game game
)
{
super(game
);
mInstance =
this;
}
@
Override
public void init
()
{
//mFont = FontUtil.createFontFromBinaryFile(getGame().getGraphics(), Gdx.files.internal("data/fonts/arial10.bzf"));
//mInGameFont = FontUtil.createFontFromBinaryFile(getGame().getGraphics(), Gdx.files.internal("data/fonts/ingame.bzf"));
mInGameFont = getGame
().
getFonts().
loadFont("data/fonts/ingame.bzf");
//mInGameFont.setFiltering(true);
//mScoringFont = FontUtil.createFontFromBinaryFile(getGame().getGraphics(), Gdx.files.internal("data/fonts/scoring.bzf"));
mScoringFont = getGame
().
getFonts().
loadFont("data/fonts/scoring.bzf");
//mMusicPlayer = new MusicPlayer(getGame());
}
@
Override
public void exit
()
{
mInGameFont =
null;
mScoringFont =
null;
/* if (mFont != null)
{
mFont.dispose();
mFont = null;
}*/
/* if (mInGameFont != null)
{
mInGameFont.dispose();
mInGameFont = null;
}
if (mScoringFont != null)
{
mScoringFont.dispose();
mScoringFont = null;
}*/
/* if (mMusicPlayer != null)
{
mMusicPlayer = null;
}*/
}
@
Override
public void update
(float deltaTime
)
{
//mMusicPlayer.update(deltaTime);
}
@
Override
public void render
()
{
}
public Font getFont
()
{
return mInGameFont
;
}
public Font getInGameFont
()
{
return mInGameFont
;
}
public Font getScoringFont
()
{
return mScoringFont
;
}
/* public MusicPlayer getMusicPlayer()
{
return mMusicPlayer;
}*/
public static PonPonChunCustomServices getInstance
()
{
return mInstance
;
}
}