Rev 592 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package com.gebauz.PonPonChun.gamestates;
import com.gebauz.Bauzoid.game.Game;
import com.gebauz.Bauzoid.gamestates.BaseGameState;
import com.gebauz.Bauzoid.math.Matrix4;
import com.gebauz.Bauzoid.math.Vector4;
import com.gebauz.PonPonChun.PonPonChunCustomServices;
import com.gebauz.PonPonChun.game.GameConsts;
import com.gebauz.PonPonChun.game.GameLogic;
public class PuzzleState
extends BaseGameState
{
// Constants========================================================================================
// Embedded Types===================================================================================
// Members==========================================================================================
private GameLogic mGameLogic =
null;
// Methods==========================================================================================
public PuzzleState
(Game game
)
{
super(game
);
setFading
(true,
true);
}
@
Override
public void init
(String param
)
{
mGameLogic =
new GameLogic
(getGame
());
mGameLogic.
init(GameLogic.
GameMode.
PUZZLE, param
);
}
@
Override
public void exit
()
{
if (mGameLogic
!=
null)
{
mGameLogic.
exit();
mGameLogic =
null;
}
}
@
Override
public void update
(float deltaTime
)
{
mGameLogic.
update(deltaTime
);
}
@
Override
public void render
()
{
getGraphics
().
clear(0.35f, 0.25f, 0.35f, 0.0f
);
getRenderStates
().
projection = Matrix4.
createOrtho(
0.0f,
GameConsts.
VIRTUAL_SCREEN_WIDTH-
1,
GameConsts.
VIRTUAL_SCREEN_HEIGHT-
1,
0.0f,
0.0f,
1.0f
);
mGameLogic.
render();
PonPonChunCustomServices.
getInstance().
getInGameFont().
drawText("PROTOTYPE",
10, GameConsts.
VIRTUAL_SCREEN_HEIGHT-
50,
new Vector4
(1,
1,
1,
1), 2.0f
);
}
// Getters/Setters==================================================================================
}