[Added] Enemy player detection and shooting, [Moved] Lots of entity code to cpp files to avoid circular dependencies

This commit is contained in:
Ninjaws
2024-12-17 20:08:35 +01:00
parent e8c78770b5
commit 2400b0500a
21 changed files with 820 additions and 701 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef PLAYER_SERVICE_H
#define PLAYER_SERVICE_H
#include "raylib.h"
#include "services/Service.h"
#include "entities/Player.h"
#include <memory>
class PlayerService : public Service<PlayerService>
{
public:
void initPlayer()
{
this->player = std::make_unique<Player>();
this->player->setPosition({200, 350});
}
Player& getPlayer() {
return *this->player;
}
protected:
private:
std::unique_ptr<Player> player;
};
#endif