#include "json.hpp"
#include "constants.h"
#include "Context.h"
+#include "Helper.h"
using json = nlohmann::json;
std::ifstream f("assets/data.json");
json data = json::parse(f);
game_context.current_state = std::make_unique<Start_menu>(data);
-
- std::cout << "banenrr" << std::endl;
+ sf::Texture helper_texture;
+ helper_texture.loadFromFile(data["game_state_assets"]["helper_file"]);
+ Helper helper {helper_texture, data["helper"]};
+ CHECK(helper.get_hitbox().getPosition().x == 989.33502f);
+ CHECK(helper.get_hitbox().getPosition().y == 37.94f);
+ helper.update(game_context);
+ CHECK_FALSE(helper.get_hitbox().getPosition().x == 1000);
+ CHECK_FALSE(helper.get_hitbox().getPosition().y == 50);
}
}