I was looking at the code for FixedTickProvider and it just outputs a signal every frame no matter what the time adjustment or frametimer says. I replaced the code from that file with the code from FrameTickProvider and changed the dispatch function to
private function dispatchTick(event:Event):Void
{
var temp:Float = previousTime;
var frameTime:Float = ( Lib.getTimer() - temp ) / 1000;
while (frameTime > maximumFrameTime) {
previousTime = Lib.getTimer();
signal.dispatch(frameTime * timeAdjustment);
frameTime -= maximumFrameTime;
}
}
Now the second argument to the constructor defines how many frame-independent-seconds will elapse between signals.
new FixedTickProvider(container, 0.5); will dispatch a signal twice per second
new FixedTickProvider(container, 5); will dispatch a signal once every five seconds
I'd be willing to make a pull request if this is the intended functionality of the class but I admit I don't know how
I was looking at the code for FixedTickProvider and it just outputs a signal every frame no matter what the time adjustment or frametimer says. I replaced the code from that file with the code from FrameTickProvider and changed the dispatch function to
Now the second argument to the constructor defines how many frame-independent-seconds will elapse between signals.
new FixedTickProvider(container, 0.5);
will dispatch a signal twice per secondnew FixedTickProvider(container, 5);
will dispatch a signal once every five secondsI'd be willing to make a pull request if this is the intended functionality of the class but I admit I don't know how