Very basic collision and combat to work out the idea and a logging system on the left.
This commit is contained in:
parent
98993481b0
commit
dbc2a10933
5 changed files with 57 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include "dinkyecs.hpp"
|
||||
#include <deque>
|
||||
|
||||
namespace Components {
|
||||
struct Player {
|
||||
|
@ -27,4 +28,15 @@ namespace Components {
|
|||
struct Tile {
|
||||
std::string chr = "!";
|
||||
};
|
||||
|
||||
struct ActionLog {
|
||||
std::deque<std::string> messages;
|
||||
|
||||
void log(std::string msg) {
|
||||
messages.push_front(msg);
|
||||
if(messages.size() > 20) {
|
||||
messages.pop_back();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue