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.
38 lines
740 B
38 lines
740 B
10 years ago
|
package mightypork.gamecore.eventbus.events;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
import mightypork.gamecore.eventbus.BusEvent;
|
||
|
import mightypork.gamecore.eventbus.event_flags.ImmediateEvent;
|
||
|
import mightypork.gamecore.eventbus.event_flags.NonConsumableEvent;
|
||
|
import mightypork.gamecore.eventbus.event_flags.UnloggedEvent;
|
||
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
|
@NonConsumableEvent
|
||
|
public class UpdateEvent extends BusEvent<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)
|
||
|
{
|
||
10 years ago
|
this.deltaTime = deltaTime;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void handleBy(Updateable handler)
|
||
|
{
|
||
|
handler.update(deltaTime);
|
||
|
}
|
||
|
}
|