From 0c2a97dcc0fb370938dc0d2d3a27053c2c9cb31e Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 3 Apr 2012 23:06:21 +0100 Subject: blobs tesselated into textured polys --- gaunt01/src/trapdoor.h | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'gaunt01/src/trapdoor.h') 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& players); + + bool checkUpdate(const vector& players); void draw(); void start(); - + void startPos(ofVec2f pos); + vector 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 -- cgit v1.2.3