We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2858ad3 commit 94e7030Copy full SHA for 94e7030
src/components/player.rs
@@ -110,6 +110,10 @@ impl Player {
110
self.velocity += self.gravity;
111
self.pos_y -= self.velocity;
112
}
113
+
114
+ if self.pos_y < 0. && !gonna_boom {
115
+ self.pos_y = 0.;
116
+ }
117
118
119
pub fn shoot(&mut self) -> Option<Turbofish> {
src/game.rs
@@ -147,7 +147,9 @@ impl Game {
147
148
149
150
- let player = player.expect("No player found!");
+ let mut player = player.expect("No player found!");
151
152
+ player.pos_y += 40.;
153
154
camera.move_to(Vec2::new(player.pos_x, player.pos_y));
155
0 commit comments