Keep all "draw commands" in Game

This commit is contained in:
Stephen Seo 2023-07-31 15:28:01 +09:00
parent 7e954ed34b
commit 06d882609b
2 changed files with 6 additions and 5 deletions

View file

@ -7,4 +7,9 @@ Game::Game() {}
void Game::update() {} void Game::update() {}
void Game::draw() { DrawText("Testing...", 100, 100, 30, RAYWHITE); } void Game::draw() {
BeginDrawing();
ClearBackground(BLACK);
DrawText("Testing...", 100, 100, 30, RAYWHITE);
EndDrawing();
}

View file

@ -33,11 +33,7 @@ void jumpartifact_demo_update(void *ud) {
Game *game = (Game *)ud; Game *game = (Game *)ud;
game->update(); game->update();
BeginDrawing();
ClearBackground(BLACK);
game->draw(); game->draw();
EndDrawing();
} }
int main() { int main() {