EventConsumer
This commit is contained in:
parent
846f681648
commit
a4ed50fc38
@ -263,3 +263,9 @@ impl crate::event::EventEmitter<PhysicsEvent> for PhysicsState {
|
|||||||
best.event()
|
best.event()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl crate::event::EventConsumer<PhysicsEvent> for PhysicsState {
|
||||||
|
fn process_event(&mut self, event:EventStruct<PhysicsEvent>) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,9 @@ pub struct EventStruct<E> {
|
|||||||
pub trait EventEmitter<E> {
|
pub trait EventEmitter<E> {
|
||||||
fn next_event(&self) -> Option<EventStruct<E>>;
|
fn next_event(&self) -> Option<EventStruct<E>>;
|
||||||
}
|
}
|
||||||
|
pub trait EventConsumer<E> {
|
||||||
|
fn process_event(&mut self, event:EventStruct<E>);
|
||||||
|
}
|
||||||
|
|
||||||
//PROPER PRIVATE FIELDS!!!
|
//PROPER PRIVATE FIELDS!!!
|
||||||
pub struct EventCollector<E> {
|
pub struct EventCollector<E> {
|
||||||
|
Loading…
Reference in New Issue
Block a user