[Updated] Code for use with WASM, [TODO] Make enemy gun follow player, spawn bullets from tip of the barrel

This commit is contained in:
Ninjaws
2024-12-17 23:15:26 +01:00
parent 2400b0500a
commit d740e1a167
25 changed files with 371 additions and 438 deletions
-57
View File
@@ -1,66 +1,9 @@
#include "raylib.h"
// #include "screens/Screen.h"
// #include "screens/TitleScreen.h"
#include "services/StateService.h"
// #include <iostream>
// #if defined(PLATFORM_WEB)
// #include <emscripten/emscripten.h>
// #endif
// void step();
// static void gameloop();
int main()
{
StateService& stateService = StateService::getInstance();
stateService.setScreenSize({640,544});
stateService.startGame();
// std::cout << "StateService instance: " << service << std::endl;
// InitWindow(640, 544, "Jelly Rescue");
// // SetTargetFPS(60);
// // setScreen(EScreen::TITLE);
// #if defined(PLATFORM_WEB)
// emscripten_set_main_loop(step, 0, 1);
// #else
// while (!WindowShouldClose())
// {
// step();
// }
// #endif
// CloseWindow();
return 0;
}
// static void gameloop()
// {
// // InitAudioDevice();
// InitWindow(640, 544, "Jelly Rescue");
// // SetTargetFPS(60);
// // setScreen(EScreen::TITLE);
// #if defined(PLATFORM_WEB)
// emscripten_set_main_loop(step, 0, 1);
// #else
// while (!WindowShouldClose())
// {
// step();
// }
// #endif
// CloseWindow();
// // CloseAudioDevice();
// }
// void step()
// {
// ClearBackground(BLACK);
// }