From 6b83568e8bc283d5b6190d1b9ca561dd940fe3a3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 8 Sep 2023 17:15:49 -0700 Subject: [PATCH] EventConsumer --- src/body.rs | 6 ++++++ src/event.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/body.rs b/src/body.rs index 70a30b8..6730de6 100644 --- a/src/body.rs +++ b/src/body.rs @@ -263,3 +263,9 @@ impl crate::event::EventEmitter for PhysicsState { best.event() } } + +impl crate::event::EventConsumer for PhysicsState { + fn process_event(&mut self, event:EventStruct) { + // + } +} \ No newline at end of file diff --git a/src/event.rs b/src/event.rs index 893039f..11e48e3 100644 --- a/src/event.rs +++ b/src/event.rs @@ -6,6 +6,9 @@ pub struct EventStruct { pub trait EventEmitter { fn next_event(&self) -> Option>; } +pub trait EventConsumer { + fn process_event(&mut self, event:EventStruct); +} //PROPER PRIVATE FIELDS!!! pub struct EventCollector {