diff --git a/src/Components/Bounds.h b/src/Components/Bounds.h deleted file mode 100755 index f05c6d8..0000000 --- a/src/Components/Bounds.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef Components_Bounds_h__ -#define Components_Bounds_h__ - -#include "Component.h" - -namespace Components -{ - -struct Bounds : Component -{ - //Axis Aligned Bounding Box - glm::vec3 Origin; - glm::vec3 VolumeVector; //The vector that defines the volume of the BB, it goes from one corner to the opposite one -}; - -} -#endif // !Components_Bounds_h__ \ No newline at end of file diff --git a/src/Components/Collision.h b/src/Components/Collision.h deleted file mode 100755 index 83450a4..0000000 --- a/src/Components/Collision.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef Components_Collision_h__ -#define Components_Collision_h__ - -#include "Entity.h" -#include "Component.h" -#include - -namespace Components -{ - -struct Collision : Component -{ - Collision() : Phantom(false), Interested(false) { } - - bool Phantom; - bool Interested; - std::vector CollidingEntities; -}; - -} -#endif // !Components_Collision_h__ \ No newline at end of file diff --git a/src/Components/PowerUp.h b/src/Components/PowerUp.h deleted file mode 100755 index fce5d6e..0000000 --- a/src/Components/PowerUp.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef Components_PowerUp_h__ -#define Components_PowerUp_h__ - -#include "Component.h" - -namespace Components -{ - -struct PowerUp : Component -{ - float Speed; -}; - -} -#endif // !Components_PowerUp_h__ \ No newline at end of file diff --git a/src/Components/Stat.h b/src/Components/Stat.h deleted file mode 100755 index 31a3dc3..0000000 --- a/src/Components/Stat.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef Components_Stat_h__ -#define Components_Stat_h__ - -#include "Component.h" - -namespace Components -{ - -struct Stat : Component -{ - float Health; - bool Destroyable; -}; - -} -#endif // !Components_Stat_h__ \ No newline at end of file diff --git a/src/GameWorld.cpp b/src/GameWorld.cpp index b697d09..4be1b8f 100755 --- a/src/GameWorld.cpp +++ b/src/GameWorld.cpp @@ -113,9 +113,7 @@ void GameWorld::Update(double dt) void GameWorld::RegisterComponents() { - m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); }); m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); }); - m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); }); m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); }); m_ComponentFactory.Register("Input", []() { return new Components::Input(); }); m_ComponentFactory.Register("Model", []() { return new Components::Model(); }); diff --git a/src/GameWorld.h b/src/GameWorld.h index fb2c2a0..6601859 100755 --- a/src/GameWorld.h +++ b/src/GameWorld.h @@ -15,18 +15,14 @@ #include "Systems/SoundSystem.h" #include "Systems/PhysicsSystem.h" -#include "Components/Bounds.h" #include "Components/Camera.h" -#include "Components/Collision.h" #include "Components/DirectionalLight.h" #include "Components/Input.h" #include "Components/Model.h" #include "Components/ParticleEmitter.h" #include "Components/PointLight.h" -#include "Components/PowerUp.h" #include "Components/SoundEmitter.h" #include "Components/Sprite.h" -#include "Components/Stat.h" #include "Components/Template.h" #include "Components/Transform.h" diff --git a/src/Systems/RenderSystem.cpp b/src/Systems/RenderSystem.cpp index 95490bf..e296023 100755 --- a/src/Systems/RenderSystem.cpp +++ b/src/Systems/RenderSystem.cpp @@ -32,18 +32,6 @@ void Systems::RenderSystem::UpdateEntity(double dt, EntityID entity, EntityID pa m_Renderer->AddModelToDraw(model, position, orientation, scale, modelComponent->Visible, modelComponent->ShadowCaster); } - // Debug draw bounds -#ifdef DEBUG - auto collision = m_World->GetComponent(entity, "Collision"); - auto bounds = m_World->GetComponent(entity, "Bounds"); - if (bounds != nullptr) - { - glm::vec3 origin = m_TransformSystem->AbsolutePosition(entity) + (transformComponent->Scale * bounds->Origin); - glm::vec3 volumeVector = transformComponent->Scale * bounds->VolumeVector; - m_Renderer->AddAABBToDraw(origin, volumeVector, (collision != nullptr && collision->CollidingEntities.size() > 0)); - } -#endif - auto pointLightComponent = m_World->GetComponent(entity, "PointLight"); if (pointLightComponent != nullptr) { diff --git a/src/Systems/RenderSystem.h b/src/Systems/RenderSystem.h index 7629cd5..f55d2d6 100755 --- a/src/Systems/RenderSystem.h +++ b/src/Systems/RenderSystem.h @@ -10,8 +10,6 @@ #include "Components/Model.h" #include "Components/Transform.h" #include "Components/Camera.h" -#include "Components/Bounds.h" -#include "Components/Collision.h" #include "Renderer.h" namespace Systems