#include "../GLM.h"
-EventBox::EventBox(const mat4& _modelMat, uint _EB_TYPE) :
+EventBox::EventBox(const mat4& _modelMat, eventBoxType _EB_TYPE) :
SceneObject( _modelMat, vec4(0.f), Model::getBBoxModel(), ""),
eb_type(_EB_TYPE)
{
#include "SceneObject.h"
#include "../GLM.h"
-
-#define EB_WINZONE 1
-#define EB_LOSTZONE 2
-
-typedef unsigned int uint;
+enum eventBoxType {
+ EB_WINZONE = 0,
+ EB_LOSTZONE = 1,
+ EB_TRIGGER = 2
+};
class EventBox :
public SceneObject
{
public:
- EventBox(const mat4& modelMat, uint EB_TYPE=0);
+ EventBox(const mat4& modelMat, eventBoxType EB_TYPE);
~EventBox();
virtual void update(float) override;
virtual void collides(SceneObject* other, btPersistentManifold* contactManifold, float deltaT = 1.f) override;
protected:
- uint eb_type;
+ eventBoxType eb_type;
+ SceneObject* trigger;
};
//Rotate Play in move direction
if (move_x || move_y)
turnTo(cam.getWorldDirection(), 3 * deltaT / TIME_TILL_DIRECTION_ROTATE);
+
+ //hit E
+ if (Events::isKHeld(SDLK_e))
+ {
+
+ }
}