Arena works better now and I can give a list of sprites to work as fixtures in a scene.
This commit is contained in:
parent
59ba73baa0
commit
71e3c97cf0
8 changed files with 169 additions and 36 deletions
|
|
@ -76,12 +76,18 @@ namespace components {
|
|||
int hp = 10;
|
||||
};
|
||||
|
||||
struct Sprite {
|
||||
string name;
|
||||
float scale;
|
||||
};
|
||||
|
||||
struct BossFight {
|
||||
std::string background;
|
||||
std::optional<std::string> floor;
|
||||
std::string floor_pos;
|
||||
json player;
|
||||
json boss;
|
||||
json fixtures;
|
||||
};
|
||||
|
||||
struct Combat {
|
||||
|
|
@ -105,12 +111,6 @@ namespace components {
|
|||
std::vector<std::string> events;
|
||||
};
|
||||
|
||||
struct Sprite {
|
||||
string name;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
struct Sound {
|
||||
std::string attack;
|
||||
std::string death;
|
||||
|
|
@ -149,8 +149,8 @@ namespace components {
|
|||
using ComponentMap = std::unordered_map<std::string, ReflFuncSignature>;
|
||||
|
||||
ENROLL_COMPONENT(Tile, display, foreground, background);
|
||||
ENROLL_COMPONENT(BossFight, background, floor, floor_pos, player, boss);
|
||||
ENROLL_COMPONENT(Sprite, name, width, height);
|
||||
ENROLL_COMPONENT(BossFight, background, floor, floor_pos, player, boss, fixtures);
|
||||
ENROLL_COMPONENT(Sprite, name, scale);
|
||||
ENROLL_COMPONENT(Curative, hp);
|
||||
ENROLL_COMPONENT(LightSource, strength, radius);
|
||||
ENROLL_COMPONENT(Position, location.x, location.y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue