@barrylachapelle wrote:
Hi.
Ive been struggling... how do I access/update a var in ofApp from a child class method? My code so far below...
ofApp:
int variable; //change this var childClass child; void ofApp::setup(){ child.setup(); } void ofApp::update(){ child.update(); } void ofApp::draw(){ child.draw(); }
childClass:
class childClass { } void childClass::setup(){ } void childClass::update(){ } void childClass::draw(){ } void childClass::customMethod(){ //change variable from here }
Posts: 3
Participants: 2