Removed unused components

This commit is contained in:
2014-04-12 18:31:30 +02:00
parent 1bd914991a
commit d13c19d654
8 changed files with 0 additions and 89 deletions
-17
View File
@@ -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__
-21
View File
@@ -1,21 +0,0 @@
#ifndef Components_Collision_h__
#define Components_Collision_h__
#include "Entity.h"
#include "Component.h"
#include <vector>
namespace Components
{
struct Collision : Component
{
Collision() : Phantom(false), Interested(false) { }
bool Phantom;
bool Interested;
std::vector<EntityID> CollidingEntities;
};
}
#endif // !Components_Collision_h__
-15
View File
@@ -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__
-16
View File
@@ -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__
-2
View File
@@ -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(); });
-4
View File
@@ -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"
-12
View File
@@ -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<Components::Collision>(entity, "Collision");
auto bounds = m_World->GetComponent<Components::Bounds>(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<Components::PointLight>(entity, "PointLight");
if (pointLightComponent != nullptr)
{
-2
View File
@@ -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