[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
+3 -1
View File
@@ -4,6 +4,7 @@
#include "raylib.h"
#include "services/Service.h"
#include "services/AudioService.h"
#include "services/InputService.h"
#include <vector>
#include <list>
@@ -49,7 +50,8 @@ public:
Vector2 getMouseWorldPos()
{
Vector2 mouseWorldPos = {GetMousePosition().x + camera.target.x - camera.offset.x, GetMousePosition().y};
Vector2 mouseWorldPos = {InputService::getInstance().getMousePos().x + camera.target.x - camera.offset.x,
InputService::getInstance().getMousePos().y};
return mouseWorldPos;
}