diff options
| author | Tim Redfern <tim@gray.(none)> | 2012-11-05 11:35:50 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@gray.(none)> | 2012-11-05 11:35:50 +0000 |
| commit | f4719e4e997a05bb423e9ca691de50bcbf1cb375 (patch) | |
| tree | 85fdaee33456c294f41bdf8fdf1b3fc92c462c64 /vfg/src/testApp.cpp | |
| parent | 93bcffd919104a69535d31d325026a37bcf0901d (diff) | |
flake interaction
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; + } } //-------------------------------------------------------------- |
