summaryrefslogtreecommitdiff
path: root/gaunt01/src/trapdoor.h
diff options
context:
space:
mode:
Diffstat (limited to 'gaunt01/src/trapdoor.h')
-rw-r--r--gaunt01/src/trapdoor.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/gaunt01/src/trapdoor.h b/gaunt01/src/trapdoor.h
new file mode 100644
index 0000000..16ad3b1
--- /dev/null
+++ b/gaunt01/src/trapdoor.h
@@ -0,0 +1,46 @@
+#ifndef TRAPDOOR_H
+#define TRAPDOOR_H
+
+#include "ofMain.h"
+#include "morphmesh.h"
+#include "normBindTexture.h"
+
+/*
+const vector<ofxCvBlob>& blobs
+
+receive vector of player positions
+needs to 'debounce' - time threshold for activation
+
+creaking sound player
+*/
+
+class trapdoor
+{
+ public:
+ trapdoor(ofRectangle boundingRect=ofRectangle(0,0,100,100),ofVec2f _doorSize=ofVec2f(10,10));
+ virtual ~trapdoor();
+
+ void checkUpdate(const vector<ofVec3f>& players);
+ void draw();
+ void start();
+
+ protected:
+ private:
+ morphmesh surround;
+ morphmesh lid;
+
+ ofVec2f position;
+
+ float startTime;
+ float triggerTime; //time threshold
+
+ ofRectangle boundingRect;
+ ofVec2f doorSize;
+
+ float doorAngle;
+
+ ofImage texture;
+
+};
+
+#endif // TRAPDOOR_H