hello
i try to test ofxSceneManager addon to switch some sketch and examples, but when I compile, change scenes, they will copy!
when compile, show the first scene normal:
change to the second scene, normal.
change to the first scene again. double gui...
change to the second scene.. double particle system.
change to the first scene.. triple.
the code:
#include "ofApp.h"
#include "msafluids/FirstScene.h"
#include "wiiacuarium/SecondScene.h"
//--------------------------------------------------------------
void ofApp::setup(){
server.setName("The Floor");
FirstScene* firstScene = new FirstScene;
firstScene->setSceneDuration(0.5, 1.5, 0.5);
SecondScene* secondScene = new SecondScene;
secondScene->setSceneDuration(0.5, 3.0, 0.5);
sceneManager.addScene(ofPtr<ofxScene>(firstScene));
sceneManager.addScene(ofPtr<ofxScene>(secondScene));
//sceneManager.setExitByTime(true);
sceneManager.setTransitionDissolve();
//sceneManager.setTransitionFade();
sceneManager.run();
}
//--------------------------------------------------------------
void ofApp::update(){
sceneManager.update();
}
//--------------------------------------------------------------
void ofApp::draw(){
sceneManager.draw();
server.publishScreen();
ofSetColor(255);
ofDrawBitmapString("scenes: "+ofToString(sceneManager.scenes.size()), 10,10);
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
if (key == ' ') {
sceneManager.changeScene();
} else if (key == '0') {
sceneManager.changeScene(0);
} else if (key == '1') {
sceneManager.changeScene(1);
}
}
anything work with this addon? eny help?
thanks community!!!!