Created
March 19, 2013 10:09
-
-
Save kenjiSpecial/5194964 to your computer and use it in GitHub Desktop.
easy ball.h file for openFrameworks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ofMain.h" | |
class Ball{ | |
public: | |
ofPoint pos; | |
ofColor col; | |
ofColor touchCol; | |
bool bDragged; | |
void init(){ | |
pos.set(200, 200); | |
col.set(100, 100, 100, 255); | |
touchCol.set(255, 0, 0,255); | |
bDragged = false; | |
ofLog() << "init"; | |
} | |
void draw_ball(){ | |
// ofLog() << "call"; | |
if (bDragged){ | |
ofSetColor(touchCol); | |
ofCircle(pos, 100); | |
}else{ | |
ofSetColor(col); | |
ofCircle(pos, 30); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment