MCPcopy Create free account
hub / github.com/PerroEngine/Perro / begin_frame

Method begin_frame

perro_source/api_modules/perro_input_api/src/snapshot.rs:55–71  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

53
54 /// Start a new frame.
55 ///
56 /// Applies queued script commands, clears one-frame device edges, clears
57 /// one-frame action edges, and refreshes persistent action-down bits.
58 #[inline]
59 pub fn begin_frame(&mut self) {
60 self.apply_queued_commands();
61 self.keyboard.begin_frame();
62 self.mouse.begin_frame();
63 for pad in &mut self.gamepads {
64 pad.begin_frame();
65 }
66 for jc in &mut self.joycons {
67 jc.begin_frame();
68 }
69 for player in &mut self.players {
70 player.begin_frame();
71 }
72 self.action_pressed.fill(0);
73 self.action_released.fill(0);
74 self.refresh_all_action_down();

Callers

nothing calls this directly

Calls 3

apply_queued_commandsMethod · 0.80
fillMethod · 0.80

Tested by

no test coverage detected