[Updated] Code for use with WASM, [TODO] Make enemy gun follow player, spawn bullets from tip of the barrel
This commit is contained in:
+37
-31
@@ -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
|
||||
Reference in New Issue
Block a user