Skip to content

Commit a9a5797

Browse files
committed
Bump version
1 parent f554a49 commit a9a5797

File tree

4 files changed

+31
-18
lines changed

4 files changed

+31
-18
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stellar-squeezebox"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66

src/bundles/lyon_rendering.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ pub mod powerups {
177177

178178
pub mod ship_parts {
179179
pub const THRUSTER_JET: [(f32, f32); 7] = [
180-
(-0.5 , -0.5 + 0.5),
181-
(-0.3 , -0.3+ 0.5),
182-
(-0.1, -0.1+ 0.5),
183-
(0.0, 1.0+ 0.5),
184-
(0.1, -0.1+ 0.5),
185-
(0.3, -0.3+ 0.5),
186-
(0.5, -0.5+ 0.5),
180+
(-0.5, -0.5 + 0.5),
181+
(-0.3, -0.3 + 0.5),
182+
(-0.1, -0.1 + 0.5),
183+
(0.0, 1.0 + 0.5),
184+
(0.1, -0.1 + 0.5),
185+
(0.3, -0.3 + 0.5),
186+
(0.5, -0.5 + 0.5),
187187
];
188188
}

src/player/mod.rs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,26 +251,30 @@ pub struct ThrusterBundle {
251251

252252
impl ThrusterBundle {
253253
pub fn with_color(p_color: PlayerColor) -> Self {
254-
255254
ThrusterBundle {
256255
lyon_render: LyonRenderBundle {
257256
shape_render: ShapeBundle {
258257
path: get_path_from_verts(&THRUSTER_JET, Vec2::splat(24.0)),
259-
transform: Transform::from_rotation(Quat::from_rotation_z(PI)).with_translation(Vec3::new(0.0, -24.0, 0.0)),
258+
transform: Transform::from_rotation(Quat::from_rotation_z(PI))
259+
.with_translation(Vec3::new(0.0, -24.0, 0.0)),
260260
..default()
261261
},
262262
stroke: Stroke::color(p_color.color()),
263263
fill: Fill::color(p_color.color()),
264264
},
265265
thruster: Thruster { val: 0.0 },
266-
replicate: Replication
266+
replicate: Replication,
267267
}
268268
}
269269
}
270270

271-
fn handle_thruster(mut thrusters: Query<(&mut Transform, &Thruster)>, time: Res<Time>){
271+
fn handle_thruster(mut thrusters: Query<(&mut Transform, &Thruster)>, time: Res<Time>) {
272272
for (mut transform, thruster) in thrusters.iter_mut() {
273-
transform.scale.y = thruster.val * ((time.elapsed_seconds_wrapped() * 20.0).sin().abs().clamp(0.5, 1.0));
273+
transform.scale.y = thruster.val
274+
* ((time.elapsed_seconds_wrapped() * 20.0)
275+
.sin()
276+
.abs()
277+
.clamp(0.5, 1.0));
274278
}
275279
}
276280

@@ -412,18 +416,27 @@ pub fn player_actions(
412416
//TODO: There's only one debuff, obviously this needs to be moved to a match at some point
413417
match player.debuff {
414418
Some(Debuff::Slowed) => {
415-
if let Some((_parent, mut thruster)) = thrusters.iter_mut().find(|(parent, _thruster)|{parent.get() == entity}){
419+
if let Some((_parent, mut thruster)) = thrusters
420+
.iter_mut()
421+
.find(|(parent, _thruster)| parent.get() == entity)
422+
{
416423
thruster.val = (thruster.val - time.delta_seconds()).min(1.0).max(0.0);
417424
}
418425
}
419426
_ => {
420427
velocity.linvel += forward.xy() * time.delta_seconds() * 50.0;
421-
if let Some((_parent, mut thruster)) = thrusters.iter_mut().find(|(parent, _thruster)|{parent.get() == entity}){
428+
if let Some((_parent, mut thruster)) = thrusters
429+
.iter_mut()
430+
.find(|(parent, _thruster)| parent.get() == entity)
431+
{
422432
thruster.val = (thruster.val + time.delta_seconds()).min(1.0).max(0.0);
423433
}
424-
},
434+
}
425435
}
426-
}else if let Some((_parent, mut thruster)) = thrusters.iter_mut().find(|(parent, _thruster)|{parent.get() == entity}){
436+
} else if let Some((_parent, mut thruster)) = thrusters
437+
.iter_mut()
438+
.find(|(parent, _thruster)| parent.get() == entity)
439+
{
427440
thruster.val = (thruster.val - time.delta_seconds()).min(1.0).max(0.0);
428441
}
429442
if action_state.pressed(PlayerAction::TurnRight) {

0 commit comments

Comments
 (0)