Added UniformScale component which keeps an entity's scale at a uniform value relative to the screen.

This commit is contained in:
2016-01-17 06:22:35 +01:00
parent 9f447afbdb
commit 6ec2258758
6 changed files with 68 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef UniformScaleSystem_h__
#define UniformScaleSystem_h__
#include "../GLM.h"
#include "System.h"
#include "../Rendering/ESetCamera.h"
class UniformScaleSystem : public PureSystem
{
public:
UniformScaleSystem(EventBroker* eventBroker);
virtual void UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& cUniformScale, double dt) override;
private:
EntityWrapper m_Camera = EntityWrapper::Invalid;
EventRelay<UniformScaleSystem, Events::SetCamera> m_ESetCamera;
bool OnSetCamera(const Events::SetCamera& e);
};
#endif