예제 #1
0
void ofApp::update(){
	world.update();
	fields.update();
	gui->circleCount = circles.size();

	if(gui->isPlay) {
		updateCircles();
	}

}
예제 #2
0
파일: testApp.cpp 프로젝트: MrMdR/julapy
//--------------------------------------------------------------
void testApp::update()
{
	if( tileSaver.bGoTiling )
		return;
	
	if( bPause )
		return;
	
	updateCamera();
	
	if( cameraNewFrame )
	{
		if( bUseCamera )
		{
			updateCv( camera.getPixels() );
		}
		else
		{
			updateCv( video.getPixels() );
		}
	
		opticalField.update( cameraGrayImage.getPixels() );
		
		if( ofGetFrameNum() % 1 == 0 )
		{
			int blobs;
			blobs = updateContours();
			
			if( blobs > 0 )
			{
				clearShapes();
				parseShapes();
				scaleShapes();
		
				addCirclesToBox2d();
				
//				updateTriangles();
//				addTrianglesToBox2d();
			}
		}
	}
	
//	updateTriangleShapes();
	updateCirclePacker();
	updateCircles();
	
	box2d.update();
}
예제 #3
0
void GameManager::update()
{
	_player.update(_click, _mouseX, _mouseY, _keyState, &_food);
	int jump = _food.update();
	_background.update(jump);
	
	checkPlayerCollision();
	
	if(jump){
		float x = 0;
		float y = 0;
		_food.getPos(&x, &y);
		addCircle(x, y, GC::FOOD_CIRCLE_SPEED, GC::FOOD_CIRCLE_START_SIZE, GC::FOOD_CIRCLE_MAX_SIZE);
	}
	updateCircles();
	
}