<commit_before>#include "level2.h"

Level2::Level2(int screenWidthCamera, int screenHeightCamera) : Level::Level(screenWidthCamera, screenHeightCamera)
{
	this->player->localPosition = glm::vec2(480.0f, 100.0f);
	// We need to update the player otherwise the position will not be set because of the player using velocity and the velocity overrride it's position
	this->player->UpdateChilderen(this, 0.0f);

	enemy = new Enemy(player, 900.0f, 0.1f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy->localPosition = glm::vec2(0, -300);
	enemy->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy->SetDebugColor(glm::vec3(1, 0, 1));
	enemy->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy);

	enemy1 = new Enemy(player, 900.0f, 0.1f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy1->localPosition = glm::vec2(1, -300);
	enemy1->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy1->SetDebugColor(glm::vec3(1, 0, 1));
	enemy1->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy1);

	enemy2 = new Enemy(player, 900.0f, 0.1f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy2->localPosition = glm::vec2(800, -300);
	enemy2->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy2->SetDebugColor(glm::vec3(1, 0, 1));
	enemy2->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy2);

	wall = new B2Entity(720, 750, ResourceManager::GetTexture("wall")->GetId(), world);
	wall->localPosition = glm::vec2(450, 450);
	wall->CreateBoxCollider(720, 100, glm::vec2(0, 0), false, false);
	AddChild(wall);

	mirror = new Mirror(true, 45.0f, 240.0f, ResourceManager::GetTexture("mirror")->GetId(), world);
	mirror->localPosition = glm::vec2(700.0f, 1000.0f);
	mirror->CreateBoxCollider(45.0f, 240.0f, glm::vec2(0.0f, 0.0f), false, false);
	mirror->SetRotation(-90.0f);
	AddChild(mirror);

	CreateFinish(10000, 540, 400, 100);
}

Level2::~Level2()
{
	if (player != nullptr) {
		delete enemy;
		delete enemy1;
		delete enemy2;
	}
	delete wall;
	delete mirror;<commit_msg>Changed the force towards the player of the enemy<commit_after>#include "level2.h"

Level2::Level2(int screenWidthCamera, int screenHeightCamera) : Level::Level(screenWidthCamera, screenHeightCamera)
{
	this->player->localPosition = glm::vec2(480.0f, 100.0f);
	// We need to update the player otherwise the position will not be set because of the player using velocity and the velocity overrride it's position
	this->player->UpdateChilderen(this, 0.0f);

	enemy = new Enemy(player, 900.0f, 0.6f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy->localPosition = glm::vec2(0, -300);
	enemy->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy->SetDebugColor(glm::vec3(1, 0, 1));
	enemy->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy);

	enemy1 = new Enemy(player, 900.0f, 0.6f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy1->localPosition = glm::vec2(1, -300);
	enemy1->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy1->SetDebugColor(glm::vec3(1, 0, 1));
	enemy1->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy1);

	enemy2 = new Enemy(player, 900.0f, 0.6f, 0.5f, 1, 5, 1, 70, 70, ResourceManager::GetTexture("enemy")->GetId(), world);
	enemy2->localPosition = glm::vec2(800, -300);
	enemy2->CreateBoxCollider(70, 70, glm::vec2(0, 0), true, false);
	enemy2->SetDebugColor(glm::vec3(1, 0, 1));
	enemy2->UpdateChilderen(this, 0.0f);
	this->AddChild(enemy2);

	wall = new B2Entity(720, 750, ResourceManager::GetTexture("wall")->GetId(), world);
	wall->localPosition = glm::vec2(450, 450);
	wall->CreateBoxCollider(720, 100, glm::vec2(0, 0), false, false);
	AddChild(wall);

	mirror = new Mirror(true, 45.0f, 240.0f, ResourceManager::GetTexture("mirror")->GetId(), world);
	mirror->localPosition = glm::vec2(700.0f, 1000.0f);
	mirror->CreateBoxCollider(45.0f, 240.0f, glm::vec2(0.0f, 0.0f), false, false);
	mirror->SetRotation(-90.0f);
	AddChild(mirror);

	CreateFinish(10000, 540, 400, 100);
}

Level2::~Level2()
{
	if (player != nullptr) {
		delete enemy;
		delete enemy1;
		delete enemy2;
	}
	delete wall;
	delete mirror;
{'fraction_non_alphanumeric': 0.18551822053951728, 'fraction_numerical': 0.09465215333648841, 'mean_word_length': 5.918166939443535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1985178', 'n_tokens_mistral': 1929, 'n_tokens_neox': 1679, 'n_words': 355}