You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
538 B
19 lines
538 B
#pragma once
|
|
#include "dinkyecs.hpp"
|
|
#include <nlohmann/json.hpp>
|
|
#include <vector>
|
|
|
|
namespace components {
|
|
using namespace nlohmann;
|
|
|
|
typedef std::function<void(DinkyECS::Entity ent, json &config, DinkyECS::World &world)> Action;
|
|
|
|
void StairsDown(DinkyECS::Entity player_ent, json &data, DinkyECS::World &world);
|
|
void StairsUp(DinkyECS::Entity player_ent, json &data, DinkyECS::World &world);
|
|
|
|
struct Device {
|
|
json config;
|
|
std::vector<Action> actions;
|
|
void hit(DinkyECS::Entity ent, DinkyECS::World &world);
|
|
};
|
|
}
|
|
|