[FIXED] merge
This commit is contained in:
@@ -1,43 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include "collision_entity.h"
|
|
||||||
|
|
||||||
namespace entities
|
|
||||||
{
|
|
||||||
class Player : public CollisionEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Player(const models::TexturedModel& model, const glm::vec3& position, const glm::vec3& rotation, float scale,
|
|
||||||
const collision::Box& bounding_box)
|
|
||||||
: CollisionEntity(model, position, rotation, scale, bounding_box)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
position.x += 0.11f;
|
|
||||||
MoveCollisionBox();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnCollide(const ::collision::Collision& collision) override
|
|
||||||
{
|
|
||||||
std::cout << "Player got HIT" << std::endl;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class Player2 : public CollisionEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Player2(const models::TexturedModel& model, const glm::vec3& position, const glm::vec3& rotation, float scale,
|
|
||||||
const collision::Box& bounding_box)
|
|
||||||
: CollisionEntity(model, position, rotation, scale, bounding_box)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void Update() { position.x -= 0.01f; MoveCollisionBox(); }
|
|
||||||
|
|
||||||
void OnCollide(const ::collision::Collision& collision) override
|
|
||||||
{
|
|
||||||
std::cout << "Player2 got HIT" << std::endl;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -49,14 +49,9 @@ int main(void)
|
|||||||
|
|
||||||
current_scene = new scene::Startup_Scene();
|
current_scene = new scene::Startup_Scene();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
glfwSetKeyCallback(window, [](GLFWwindow* window, int key, int scancode, int action, int mods)
|
glfwSetKeyCallback(window, [](GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||||
{
|
{
|
||||||
current_scene->onKey(window, key, scancode, action, mods);
|
current_scene->onKey(window, key, scancode, action, mods);
|
||||||
if (key == GLFW_KEY_ESCAPE)
|
|
||||||
glfwSetWindowShouldClose(window, true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bool window_open = true;
|
bool window_open = true;
|
||||||
@@ -90,7 +85,6 @@ int main(void)
|
|||||||
|
|
||||||
// Clean up -> preventing memory leaks!!!
|
// Clean up -> preventing memory leaks!!!
|
||||||
std::cout << "ending..." << std::endl;
|
std::cout << "ending..." << std::endl;
|
||||||
delete current_scene;
|
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#include "scene.h"
|
|
||||||
|
|
||||||
namespace scene
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\collision\collision_handler.cpp" />
|
<ClCompile Include="src\collision\collision_handler.cpp" />
|
||||||
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
|
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
|
||||||
<ClCompile Include="src\scenes\scene.cpp" />
|
|
||||||
<ClCompile Include="src\entities\camera.cpp" />
|
<ClCompile Include="src\entities\camera.cpp" />
|
||||||
<ClCompile Include="src\entities\collision_entity.cpp" />
|
<ClCompile Include="src\entities\collision_entity.cpp" />
|
||||||
<ClCompile Include="src\entities\entity.cpp" />
|
<ClCompile Include="src\entities\entity.cpp" />
|
||||||
@@ -45,7 +44,6 @@
|
|||||||
<ClInclude Include="src\entities\collision_entity.h" />
|
<ClInclude Include="src\entities\collision_entity.h" />
|
||||||
<ClInclude Include="src\entities\entity.h" />
|
<ClInclude Include="src\entities\entity.h" />
|
||||||
<ClInclude Include="src\entities\light.h" />
|
<ClInclude Include="src\entities\light.h" />
|
||||||
<ClInclude Include="src\entities\player.h" />
|
|
||||||
<ClInclude Include="src\gui\gui_element.h" />
|
<ClInclude Include="src\gui\gui_element.h" />
|
||||||
<ClInclude Include="src\gui\gui_interactable.h" />
|
<ClInclude Include="src\gui\gui_interactable.h" />
|
||||||
<ClInclude Include="src\models\model.h" />
|
<ClInclude Include="src\models\model.h" />
|
||||||
|
|||||||
@@ -48,9 +48,6 @@
|
|||||||
<ClCompile Include="src\gui\gui_interactable.cpp">
|
<ClCompile Include="src\gui\gui_interactable.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\scenes\scene.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\scenes\in_Game_Scene.cpp">
|
<ClCompile Include="src\scenes\in_Game_Scene.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -125,8 +122,5 @@
|
|||||||
<ClInclude Include="src\collision\collision_handler.h">
|
<ClInclude Include="src\collision\collision_handler.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\entities\player.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user