#ifndef TRAPDOOR_H #define TRAPDOOR_H #include "ofMain.h" #include "morphmesh.h" #include "normBindTexture.h" /* const vector& 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& 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; float doorSpeed; ofImage texture; }; #endif // TRAPDOOR_H