DinkyECS is now controlling the game and can handle multiple enemies easily. Next is to clean this up so it's not just one gross pile of code in the gui.

This commit is contained in:
Zed A. Shaw 2024-10-16 15:01:53 -04:00
parent 86c98c43c2
commit 33327154ad
9 changed files with 195 additions and 149 deletions

View file

@ -10,8 +10,8 @@
#include <ftxui/dom/canvas.hpp>
#include <locale>
#include <string>
#include "entity.hpp"
#include "map.hpp"
#include "dinkyecs.hpp"
using std::string;
using ftxui::Canvas, ftxui::Component, ftxui::Screen;
@ -42,9 +42,6 @@ class GUI {
sf::Sound $hit_sound;
bool $show_paths = false;
string $status_text = "NOT DEAD";
Entity $player;
Entity $enemy;
Point $goal;
Component $document;
Component $map_view;
Canvas $canvas;
@ -57,6 +54,7 @@ class GUI {
sf::RenderWindow $window;
Screen $screen;
Screen $map_screen;
DinkyECS::World $world;
public:
GUI();
@ -71,6 +69,7 @@ public:
void draw_screen(bool clear=true, float map_off_x=0.0f, float map_off_y=0.0f);
void shake();
void burn();
void configure_world();
int main();
};