Skip to content

Commit a97c2de

Browse files
author
Rémi Lauzier
committed
Typo fixes and fix some warnings
1 parent f22426d commit a97c2de

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A thrilling action game where your favorite Ferris the crab and the rust mascot
1313
<img src="misc/dead.png">
1414
<img src="misc/gameplay-1.png">
1515
<img src="misc/gameplay-2.png">
16-
Call of Ferris also comes with super hot slow motion for great bullet time and accurecy
16+
Call of Ferris also comes with super hot slow motion for great bullet time and accuracy
1717

1818
## Thanks
1919
- @s-mv for almost all of the assets!

ggez-goodies/src/bitmap_font.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl TextMap {
4040
x: x_offset,
4141
y: y_offset,
4242
w: rect_width,
43-
h: rect_height;
43+
h: rect_height
4444
};
4545
map.insert(c, char_rect);
4646
current_x = (current_x + 1) % width;

src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ impl Game {
131131
pub fn new(ctx: &mut Context, asset_manager: AssetManager) -> Self {
132132
let asset_manager = Rc::new(asset_manager);
133133

134-
// Woah. We are cloning the asset manager. Yes thats why its wrapped in Rc<>
135-
// Anything wrapped in a Rc<> and performs a clone it only clones its pointer so its fine to use clone here!
134+
// Woah. We are cloning the asset manager. Yes that's why it's wrapped in Rc<>
135+
// Anything wrapped in a Rc<> and performs a clone it only clones its pointer, so it's fine to use clone here!
136136
Self {
137137
screen: Screen::Menu,
138138

@@ -180,12 +180,6 @@ impl EventHandler for Game {
180180
}
181181
}
182182

183-
fn key_up_event(&mut self, _ctx: &mut Context, keycode: KeyCode, _keymods: KeyMods) {
184-
if let Screen::Play = self.screen {
185-
self.game_screen.lock().unwrap().key_up_event(keycode)
186-
}
187-
}
188-
189183
fn key_down_event(
190184
&mut self,
191185
ctx: &mut Context,
@@ -215,6 +209,12 @@ impl EventHandler for Game {
215209
}
216210
}
217211

212+
fn key_up_event(&mut self, _ctx: &mut Context, keycode: KeyCode, _keymods: KeyMods) {
213+
if let Screen::Play = self.screen {
214+
self.game_screen.lock().unwrap().key_up_event(keycode)
215+
}
216+
}
217+
218218
fn resize_event(&mut self, ctx: &mut Context, width: f32, height: f32) {
219219
set_screen_coordinates(ctx, Rect::new(0.0, 0.0, width, height)).unwrap();
220220
}

src/screens/game/components/enemy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl Enemy {
123123

124124
// Can the enemy see the player?
125125
if physics.distance(self.handle(), player.handle()) < 300.0 {
126-
// TODO: The enemy shoots the player as soon as it see's the player.
126+
// TODO: The enemy shoots the player as soon as it sees the player.
127127
}
128128

129129
false

src/screens/game/physics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl ObjectData {
5151
}
5252
}
5353

54-
/// Helper physics struct that makes live's easier while using nphysics2d physics engine with ggez.
54+
/// Helper physics struct that makes lives easier while using nphysics2d physics engine with ggez.
5555
pub struct Physics {
5656
mechanical_world: world::DefaultMechanicalWorld<N>,
5757
geometrical_world: world::DefaultGeometricalWorld<N>,
@@ -62,7 +62,7 @@ pub struct Physics {
6262
}
6363

6464
impl Physics {
65-
// TODO: Move the seperate rigid body creator functions to use the create_rigid_body() and create_collider() functions indead.
65+
// TODO: Move the separate rigid body creator functions to use the create_rigid_body() and create_collider() functions in dead.
6666

6767
/// The amount of gravity for the Y axis in the physics world.
6868
const GRAVITY: N = 300.0;
@@ -235,7 +235,7 @@ impl Physics {
235235
barrel_handle
236236
}
237237

238-
/// Create a new bullet. Can be any included in crate::components::bullet::PlayerWepon enum
238+
/// Create a new bullet. Can be any included in crate::components::bullet::PlayerWeapon enum
239239
pub fn create_bullet(
240240
&mut self,
241241
pos: na::Point2<f32>,

0 commit comments

Comments
 (0)