You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
718 B
36 lines
718 B
10 years ago
|
package mightypork.gamecore.control.events;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
import mightypork.util.control.eventbus.events.Event;
|
||
|
import mightypork.util.control.eventbus.events.flags.ImmediateEvent;
|
||
|
import mightypork.util.control.eventbus.events.flags.UnloggedEvent;
|
||
|
import mightypork.util.control.timing.Updateable;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
/**
|
||
10 years ago
|
* Delta timing update event. Not logged.
|
||
10 years ago
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
10 years ago
|
@UnloggedEvent
|
||
10 years ago
|
@ImmediateEvent
|
||
10 years ago
|
public class UpdateEvent implements Event<Updateable> {
|
||
10 years ago
|
|
||
|
private final double deltaTime;
|
||
|
|
||
|
|
||
10 years ago
|
/**
|
||
|
* @param deltaTime time since last update (sec)
|
||
|
*/
|
||
10 years ago
|
public UpdateEvent(double deltaTime) {
|
||
|
this.deltaTime = deltaTime;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void handleBy(Updateable handler)
|
||
|
{
|
||
|
handler.update(deltaTime);
|
||
|
}
|
||
|
}
|