summaryrefslogtreecommitdiff
path: root/gaunt01/src/trapdoor.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-04-01 23:07:39 +0100
committerTim Redfern <tim@eclectronics.org>2012-04-01 23:07:39 +0100
commit0363ee4f188c735a43c6624a2b10a191f74c3029 (patch)
treeb24e56926c4d7055767f98230b9a8da5b70baccf /gaunt01/src/trapdoor.h
parent1b9e8ee051740c4b7f35ffc72648364192e35f59 (diff)
nearly working trap door
Diffstat (limited to 'gaunt01/src/trapdoor.h')
-rw-r--r--gaunt01/src/trapdoor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gaunt01/src/trapdoor.h b/gaunt01/src/trapdoor.h
index 43121e3..b1318b3 100644
--- a/gaunt01/src/trapdoor.h
+++ b/gaunt01/src/trapdoor.h
@@ -17,12 +17,15 @@ creaking sound player
class trapdoor
{
public:
- trapdoor(ofRectangle boundingRect=ofRectangle(0,0,100,100),ofVec2f _doorSize=ofVec2f(10,10));
+ trapdoor(ofVec2f _boundTR=ofVec2f(0,0),ofVec2f _boundBR=ofVec2f(0,0),ofVec2f _doorSize=ofVec2f(10,10));
virtual ~trapdoor();
void checkUpdate(const vector<ofVec3f>& players);
void draw();
void start();
+
+ vector<ofVec2f> getCorners();
+ ofVec2f bounds2UV(ofVec2f pt);
protected:
private:
@@ -30,6 +33,9 @@ class trapdoor
morphmesh lid;
ofVec2f position;
+ ofVec2f boundTR;
+ ofVec2f boundBR;
+ ofVec2f size;
float startTime;
float triggerTime; //time threshold