Пример #1
0
	void Game::draw()
	{
		window.clear();
		
		// let game draw
		gameDraw();
		
#ifdef DEBUG
		window.draw(fps);
#endif
		
		window.display();
	}
Пример #2
0
OPint GSgameUpdate(OPtimer* timer)
{
	OPfloat dt = OPtimerDelta(timer);

	ShipBatchUpdate(dt);
	ProjectileBatchUpdate(dt);

	// update the player's controller
	CONTROLLER_PLAYER.handler(CONTROLLER_PLAYER.ship, dt);

	// now update all the ai
	for(register OPint i = SPACE_AI_PLAYERS; i--;){
		CONTROLLER_AIS[i].handler(CONTROLLER_AIS[i].ship, dt);
	}

	gameDraw(dt);
	return 0;
}
Пример #3
0
void Title::draw()
{
    if (!UIType::is_loop) {
        gameDraw();
        ui.titleDraw();
        gl::popMatrices();

        //ci::gl::clear(ColorA(color_r, color_g, color_b, 1.0f));

    }
    else {
        setup();
        UIType::is_loop = false;
    }

    //gl::popMatrices();

}