AnimatedScene now defines how a scene with animated sprites and actors is structured and played.
This commit is contained in:
parent
e1da089600
commit
25f7096489
10 changed files with 43 additions and 48 deletions
|
|
@ -35,8 +35,8 @@ TEST_CASE("make sure json_mods works", "[components]") {
|
|||
// this confirms that loading something with an optional
|
||||
// field works with the json conversions in json_mods.hpp
|
||||
for(auto& comp_data : config["RAT_KING"]["components"]) {
|
||||
if(comp_data["_type"] == "BossFight") {
|
||||
auto comp = components::convert<components::BossFight>(comp_data);
|
||||
if(comp_data["_type"] == "AnimatedScene") {
|
||||
auto comp = components::convert<components::AnimatedScene>(comp_data);
|
||||
// the boss fight for the rat king doesn't have a stage so false=optional
|
||||
REQUIRE(comp.floor == std::nullopt);
|
||||
}
|
||||
|
|
@ -50,6 +50,6 @@ TEST_CASE("make sure json_mods works", "[components]") {
|
|||
|
||||
components::configure_entity(world, rat_king, config["RAT_KING"]["components"]);
|
||||
|
||||
auto boss = world.get<BossFight>(rat_king);
|
||||
auto boss = world.get<AnimatedScene>(rat_king);
|
||||
REQUIRE(boss.floor == std::nullopt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue