diff options
Diffstat (limited to 'vfg/src/testApp.cpp')
| -rwxr-xr-x | vfg/src/testApp.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/vfg/src/testApp.cpp b/vfg/src/testApp.cpp index 675baef..2a67d8f 100755 --- a/vfg/src/testApp.cpp +++ b/vfg/src/testApp.cpp @@ -25,16 +25,36 @@ void testApp::draw(){ ofSetColor(0,0,0,100); ofRect(0,0,ofGetWidth(),ofGetHeight()); if (testsong->isPlaying) testsong->draw(); + else { + ofSetColor(255,255,255); + ofDrawBitmapString("game over!", (ofGetWidth()/2)-25,(ofGetHeight()/2)-5); + } } //-------------------------------------------------------------- void testApp::keyPressed(int key){ + switch (key) { + case '0': + if (!testsong->isPlaying) testsong->preRoll(250); + break; + case '1': + case '2': + case '3': + testsong->playerControl(key-'0'); + break; + } } //-------------------------------------------------------------- void testApp::keyReleased(int key){ - + switch (key) { + case '1': + case '2': + case '3': + testsong->playerControl(0); + break; + } } //-------------------------------------------------------------- |
