Java code to set an eventOut field - II
Public void processEvent(Event e) {
ConstSFBool v = (ConstSFBool)e.getValue();
if(v.getValue()) {
if(on.getValue()){
newColor.setValue(red);
} else { newColor.setValue(blue);
}
on.setValue(!on.getValue()); } } }
Previous slide
Next slide
Back to first slide
View graphic version