summaryrefslogtreecommitdiff
path: root/gaunt01/src/trapdoor.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-04-03 23:06:21 +0100
committerTim Redfern <tim@eclectronics.org>2012-04-03 23:06:21 +0100
commit0c2a97dcc0fb370938dc0d2d3a27053c2c9cb31e (patch)
tree1678420c09caa3ef73b4c45195b7da35cf31a363 /gaunt01/src/trapdoor.h
parent0363ee4f188c735a43c6624a2b10a191f74c3029 (diff)
blobs tesselated into textured polys
Diffstat (limited to 'gaunt01/src/trapdoor.h')
-rw-r--r--gaunt01/src/trapdoor.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/gaunt01/src/trapdoor.h b/gaunt01/src/trapdoor.h
index b1318b3..5975498 100644
--- a/gaunt01/src/trapdoor.h
+++ b/gaunt01/src/trapdoor.h
@@ -19,35 +19,43 @@ class trapdoor
public:
trapdoor(ofVec2f _boundTR=ofVec2f(0,0),ofVec2f _boundBR=ofVec2f(0,0),ofVec2f _doorSize=ofVec2f(10,10));
virtual ~trapdoor();
-
- void checkUpdate(const vector<ofVec3f>& players);
+
+ bool checkUpdate(const vector<ofVec3f>& players);
void draw();
void start();
-
+ void startPos(ofVec2f pos);
+
vector<ofVec2f> getCorners();
ofVec2f bounds2UV(ofVec2f pt);
-
+
+ void setBoundingRect(float x,float y, float width,float height);
+ ofRectangle getBoundingRect();
+
protected:
private:
morphmesh surround;
morphmesh lid;
-
+
ofVec2f position;
ofVec2f boundTR;
ofVec2f boundBR;
ofVec2f size;
-
+
float startTime;
float triggerTime; //time threshold
-
+
ofRectangle boundingRect;
ofVec2f doorSize;
-
+
float doorAngle;
float doorSpeed;
-
+
ofImage texture;
-
+
+ ofSoundPlayer* sounds;
+
+ bool opening;
+
};
#endif // TRAPDOOR_H