#include "EventBox.h"
#include "Marvin.h"
+#include "Lever.h"
//#include "../Graphix/Graphix.h"
#include "../Graphix/Shader.h"
collide_group = COL_EVENT;
collide_with = COL_MARVIN;
+ if (eb_type == EB_LEVER)
+ collide_with = COL_LEVER;
+
collision = model;
collision->bt_init();
bt_collision_object->setCollisionShape(*collision);
Message::info("Spiel Gewonnen!");
Events::halt = true;
break;
+ case EB_LEVER:
+ ((Lever*)_other)->trigger();
+ break;
}
}
enum eventBoxType {
EB_WINZONE = 0,
EB_LOSTZONE = 1,
- EB_TRIGGER = 2
+ EB_LEVER = 2
};
class EventBox :
protected:
eventBoxType eb_type;
- SceneObject* trigger;
};
Lever::Lever(const mat4& _modelMat, const vec4& _material, string _modelpath, string texturepath) : SceneObject(_modelMat, _material, _modelpath, texturepath)
{
recipient = nullptr;
+ collide_group = COL_LEVER;
+ collide_with = COL_EVENT;
}
Lever::Lever(const mat4& modelMat, const vec4& material, Model* model, string texturepath) : SceneObject(modelMat, material, model, texturepath)
{
recipient = nullptr;
+ collide_group = COL_LEVER;
+ collide_with = COL_EVENT;
}
Lever::~Lever()
}
render->updateSize(width, height);
- postRender->updateSize(width, height);
+ postRender->updateSize(width / 2, height / 2);
for (int i = 0; i < 2; i++)
- blurPingPong[i]->updateSize(width, height);
+ blurPingPong[i]->updateSize(width / 2, height / 2);
shadowdir->updateSize(width, height);
}
COL_MARVIN = BIT(1), //<Collide with Marvin
COL_ENEMY = BIT(2), //<Collide with Enemies
COL_KEY = BIT(3), //<Collide with Key's
- COL_EVENT = BIT(4)
+ COL_EVENT = BIT(4),
+ COL_LEVER = BIT(5)
};
enum drawTarget {