Merge branch 'STASHBRANCH'

Conflicts:
	Escape-the-Dawn/Escape-the-Dawn.vcxproj
	Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters
This commit is contained in:
2014-03-03 20:12:26 +01:00
12 changed files with 248 additions and 53 deletions
@@ -0,0 +1,16 @@
#include "CollisionSystem.h"
#include "World.h"
void Systems::Collision::Update(double dt, EntityID entity, EntityID parent)
{
if (parent != 0)
{
auto transform = m_World->GetComponent<Components::Transform>(entity, "Transform");
auto parentTransform = m_World->GetComponent<Components::Transform>(parent, "Transform");
transform->Position[0] += parentTransform->Position[0];
transform->Position[1] += parentTransform->Position[1];
transform->Position[2] += parentTransform->Position[2];
}
LOG_INFO("Updating entity %i with parent %i", entity, parent);
}
+23
View File
@@ -0,0 +1,23 @@
#ifndef CollisionSystem_h__
#define CollisionSystem_h__
#include "System.h"
#include "logging.h"
#include "Components/Transform.h"
namespace Systems
{
class Collision : public System
{
public:
Collision(World* world) : System(world) { }
void Update(double dt, EntityID entity, EntityID parent) override;
};
}
#endif // CollisionSystem_h__