#ifndef PUPPET_H #define PUPPET_H #include "ofMain.h" #include "ofxSprite.h" #include "ofxXmlSettings.h" /* "base" clip will be drawn unless another clip is playing hoe to create synced anim at time 1) dead reckoning from outside 2) special clip@time method 3) change to timed clips (option?) */ class puppetSprite: public ofxSprite { //puppetSprite loops by default public: void draw(float x, float y, float scale) { getCurrentImage().draw(x-(anchorPoint.x*scale),y-(anchorPoint.y*scale),getWidth()*scale,getHeight()*scale); } }; class Puppet { public: Puppet(); virtual ~Puppet(); void load(string filename); void play(string clip); void playNow(string clip); void draw(float x, float y, float scale=1.0f); bool isPlaying(); protected: private: map clips; deque playlist; }; #endif // PUPPET_H