Merge remote-tracking branch 'origin/master' into Networking

# Conflicts:
#	src/Engine/Rendering/RenderState.cpp
#	src/Game/Game.cpp
This commit is contained in:
stiffly
2015-12-15 11:50:01 +01:00
42 changed files with 1153 additions and 237 deletions
+1
View File
@@ -17,6 +17,7 @@
#include "Core/SystemPipeline.h"
#include "RaptorCopterSystem.h"
#include "PlayerSystem.h"
#include "Editor/EditorSystem.h"
// Network
#include <boost/thread.hpp>
+3 -3
View File
@@ -19,18 +19,18 @@ struct KeyInput
bool Right = false;
};
class PlayerSystem : public System
class PlayerSystem : public PureSystem
{
public:
PlayerSystem(EventBroker* eventBroker)
: System(eventBroker, "Player")
: PureSystem(eventBroker, "Player")
{
EVENT_SUBSCRIBE_MEMBER(m_EKeyDown, &PlayerSystem::OnKeyDown);
EVENT_SUBSCRIBE_MEMBER(m_EKeyUp, &PlayerSystem::OnKeyUp);
EVENT_SUBSCRIBE_MEMBER(m_ECreatePlayer, &PlayerSystem::OnCreatePlayer);
}
virtual void Update(World* world, ComponentWrapper& player, double dt) override;
virtual void UpdateComponent(World* world, ComponentWrapper& player, double dt) override;
private:
float m_Speed = 5;
+3 -5
View File
@@ -1,16 +1,14 @@
#include "Common.h"
#include "Core/System.h"
class RaptorCopterSystem : public System
class RaptorCopterSystem : public PureSystem
{
public:
RaptorCopterSystem(EventBroker* eventBroker)
: System(eventBroker, "RaptorCopter")
: PureSystem(eventBroker, "RaptorCopter")
{ }
virtual void Initialize() { }
virtual void Update(World* world, ComponentWrapper& raptorCopter, double dt) override
virtual void UpdateComponent(World* world, ComponentWrapper& raptorCopter, double dt) override
{
ComponentWrapper& transform = world->GetComponent(raptorCopter.EntityID, "Transform");
(glm::vec3&)transform["Orientation"] += (float)(double)raptorCopter["Speed"] * (float)dt * (glm::vec3)raptorCopter["Axis"];