SetImpulse event
This commit is contained in:
@@ -9,11 +9,11 @@ namespace dd
|
||||
namespace Events
|
||||
{
|
||||
|
||||
struct Contact : Event
|
||||
struct SetImpulse : Event
|
||||
{
|
||||
EntityID Entity;
|
||||
glm::vec2 Direction;
|
||||
float Strength;
|
||||
glm::vec2 Impulse;
|
||||
glm::vec2 Point;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include "Core/CTransform.h"
|
||||
#include "Transform/TransformSystem.h"
|
||||
#include "Physics/EContact.h"
|
||||
#include "Physics/ESetImpulse.h"
|
||||
#include "Physics/CCircleShape.h"
|
||||
#include "Core/EventBroker.h"
|
||||
|
||||
|
||||
namespace dd
|
||||
@@ -32,6 +34,9 @@ public:
|
||||
|
||||
~PhysicsSystem();
|
||||
|
||||
EventRelay<PhysicsSystem, Events::SetImpulse> m_SetImpulse;
|
||||
bool SetImpulse(const Events::SetImpulse &event);
|
||||
|
||||
void RegisterComponents(ComponentFactory* cf) override;
|
||||
void Initialize() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user