Last active
December 23, 2015 23:19
-
-
Save tado/6709701 to your computer and use it in GitHub Desktop.
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// 画面基本設定 | |
ofSetFrameRate(60); | |
ofBackground(63); | |
ofSetCircleResolution(32); | |
// 画面内のランダムな場所を指定 | |
position.x = ofRandom(ofGetWidth()); | |
position.y = ofRandom(ofGetHeight()); | |
} | |
//-------------------------------------------------------------- | |
void testApp::update(){ | |
} | |
//-------------------------------------------------------------- | |
void testApp::draw(){ | |
// 設定した場所に円を描く | |
ofSetHexColor(0x3399cc); | |
ofCircle(position, 10); | |
} |
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
#pragma once | |
#include "ofMain.h" | |
class testApp : public ofBaseApp{ | |
public: | |
void setup(); | |
void update(); | |
void draw(); | |
void keyPressed(int key); | |
void keyReleased(int key); | |
void mouseMoved(int x, int y ); | |
void mouseDragged(int x, int y, int button); | |
void mousePressed(int x, int y, int button); | |
void mouseReleased(int x, int y, int button); | |
void windowResized(int w, int h); | |
void dragEvent(ofDragInfo dragInfo); | |
void gotMessage(ofMessage msg); | |
// 円の位置 | |
ofVec2f position; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment