public class MyBehaviorTranslation extends Behavior{
MyBehaviorTranslation(Group root, Bounds bounds) {
this.setSchedulingBounds(bounds);
BranchGroup branchGroup = new BranchGroup();
branchGroup.addChild(this);
root.addChild(branchGroup);
}
public void initialize(){
// set initial wakeup condition
this.wakeupOn(new WakeupOnBehaviorPost(???, 0));
// set someIntegerValue to your specific value
// null can be replaced by an specific Behavior Object to send this value
}
// called by Java 3D when appropriate stimulus occures
public void processStimulus(Enumeration criteria){
// do what is necessary
// resetup Behavior
this.wakeupOn(new WakeupOnBehaviorPost(????, 0));
}
}
Agora falta passar pra WakeupOnBehaviorPost a referencia de qd Thread.sleep for ativada.
Desde ja agradeco.