helper_texture.loadFromFile(data["game_state_assets"]["helper_file"]);
map_texture.loadFromFile(data["game_state_assets"]["map_file"]);
- player = std::make_unique<Player>(player_texture, sack_texture, data["player"]);
+ player = std::make_unique<Player>(player_texture, sack_texture,
+ data["player"]);
helper = std::make_unique<Helper>(helper_texture, data["helper"]);
- enemy = std::make_unique<Main_enemy>(main_enemy_texture, data["main_enemy"]);
+ enemy = std::make_unique<Main_enemy>(main_enemy_texture,
+ data["main_enemy"]);
bottle_texture.loadFromFile(data["game_state_assets"]["kir_file"]);
YF_texture.loadFromFile(data["game_state_assets"]["YF_file"]);
{
if (pause_game)
{
- context.saved_game.reset(static_cast<Game_state *>(context.current_state.release()));
+ context.saved_game.reset
+ (static_cast<Game_state *>(context.current_state.release()));
context.next_state = std::make_unique<Pause_menu>(data);
pause_game = false;
return;
time_since_last_bike += context.time.asSeconds();
if (time_since_last_bottle >= data["game_constants"]["bottles_per_second"])
{
- bottles.push_back(std::make_unique<Bottle>(bottle_texture, data["bottle"]));
+ bottles.push_back
+ (std::make_unique<Bottle>(bottle_texture, data["bottle"]));
time_since_last_bottle = 0;
}
- if (time_since_last_yf >= 1 / static_cast<float>(data["game_constants"]["yf_per_second"]))
+ if (time_since_last_yf >= 1 /
+ static_cast<float>(data["game_constants"]["yf_per_second"]))
{
yf = std::make_unique<YF>(YF_texture, data["yf"]);
time_since_last_yf = 0;
}
- if(time_since_last_bike >= 1 / static_cast<float>(data["game_constants"]["bikes_per_second"]))
+ if(time_since_last_bike >= 1 /
+ static_cast<float>(data["game_constants"]["bikes_per_second"]))
{
bike = std::make_unique<Bike_enemy>(bike_texture, data["bike_enemy"]);
time_since_last_bike = 0;