Game Development Reference
In-Depth Information
private void FormatText(Text _text, int yPosition)
{
_text.SetPosition(-_text.Width / 2, yPosition);
_text.SetColor(new Color(0, 0, 0, 1));
}
#region IGameObject Members
public void Update(double elapsedTime)
{
_countDown -= elapsedTime;
if ( _countDown < =0||
_input.Controller.ButtonA.Pressed ||
_input.Keyboard.IsKeyPressed(System.Windows.Forms.Keys.
Enter))
{
Finish();
}
}
private void Finish()
{
_gameData.JustWon ¼ false;
_system.ChangeState("start_menu");
_countDown ¼ _timeOut;
}
public void Render()
{
Gl.glClearColor(1, 1, 1, 0);
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
if (_gameData.JustWon)
{
_renderer.DrawText(_titleWin);
_renderer.DrawText(_blurbWin);
}
else
{
_renderer.DrawText(_titleLose);
_renderer.DrawText(_blurbLose);
}
Search WWH ::




Custom Search