#include "Player.h"
#include "Context.h"
#include "constants.h"
+#include <iostream>
Player::Player(sf::Texture& player_txtr, sf::Texture& sack_txtr, json& params):
collected{0},
void Player::add_collected()
{
collected += 1;
+ max_speed *= 0.9;
}
+
int Player::get_collected()
{
return collected;
void Player::zero_collected()
{
+ std::cout << max_speed << std::endl;
+ max_speed /= pow(0.9, collected);
+
collected = 0;
}
std::ifstream f("assets/data_test.json");
json test_data = json::parse(f);
-
game_context.current_state = std::make_unique<Start_menu>(test_data);
+ f.close();
sf::Texture helper_texture;
helper_texture.loadFromFile(test_data["game_state_assets"]["helper_file"]);