mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
Make events reuse buffers (#2850)
I'm really curious why this wasn't the case already...
This commit is contained in:
parent
615d43b998
commit
29d4faa077
1 changed files with 2 additions and 2 deletions
|
@ -315,12 +315,12 @@ impl<T: Component> Events<T> {
|
|||
pub fn update(&mut self) {
|
||||
match self.state {
|
||||
State::A => {
|
||||
self.events_b = Vec::new();
|
||||
self.events_b.clear();
|
||||
self.state = State::B;
|
||||
self.b_start_event_count = self.event_count;
|
||||
}
|
||||
State::B => {
|
||||
self.events_a = Vec::new();
|
||||
self.events_a.clear();
|
||||
self.state = State::A;
|
||||
self.a_start_event_count = self.event_count;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue