MCPcopy Create free account
hub / github.com/TanTanDev/rusty_demon_attack / reset

Method reset

src/player.rs:49–56  ·  view source on GitHub ↗
(&mut self, resources: &Resources)

Source from the content-addressed store, hash-verified

47 }
48
49 pub fn reset(&mut self, resources: &Resources) {
50 let player_spawn_y =
51 GAME_SIZE_Y as f32 - resources.ground_bg.height() - resources.player.height();
52 let player_pos = vec2(GAME_CENTER_X, player_spawn_y);
53 self.pos = player_pos;
54 self.shoot_timer = 0f32;
55 self.state = PlayerState::Normal;
56 }
57
58 pub fn update(
59 &mut self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected