[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
+37 -31
View File
@@ -3,47 +3,53 @@
#include "raylib.h"
#include "enums/EFont.h"
#include <string>
#include <iostream>
#include "services/AssetService.h"
#include <string>
class Text {
public:
Text(){}
Text(std::string text, EFont font, int fontSize = 30, int spacing = 0, Color color = WHITE, Vector2 position = {100,100});
~Text(){}
class Text
{
public:
Text() {}
Text(std::string text, EFont font, int fontSize = 30, int spacing = 0, Color color = WHITE, Vector2 position = {100, 100});
~Text() {
}
Vector2 getDimensions();
Vector2 getDimensions();
void setPosition(Vector2 position) {
this->position = position;
}
void setPosition(Vector2 position)
{
this->position = position;
}
void setColor(Color color) {
this->color = color;
}
void setColor(Color color)
{
this->color = color;
}
void setText(std::string text) {
this->text = text;
}
void setText(std::string text)
{
this->text = text;
}
Vector2 getPosition() {
return position;
}
Vector2 getPosition()
{
return position;
}
std::string getText() {
return this->text;
}
std::string getText()
{
return this->text;
}
void draw();
void draw();
private:
std::string text;
Font font;
int fontSize;
int spacing;
Color color;
Vector2 position;
private:
std::string text;
Font font;
int fontSize;
int spacing;
Color color;
Vector2 position;
};
#endif