From 5725948f8553a8d79a4f5674ce53c8ddc3b56353 Mon Sep 17 00:00:00 2001 From: dawnDus <96957561+dawndus@users.noreply.github.com> Date: Fri, 28 Jan 2022 12:52:30 -0500 Subject: [PATCH] Adjust polar star caret --- src/weapon/polar_star.rs | 58 ++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/src/weapon/polar_star.rs b/src/weapon/polar_star.rs index e1c301f..296a309 100644 --- a/src/weapon/polar_star.rs +++ b/src/weapon/polar_star.rs @@ -31,28 +31,70 @@ impl Weapon { match player.direction { Direction::Left if player.up => { - bullet_manager.create_bullet(player.x - 0x200, player.y - 0x1000, btype, player_id, Direction::Up, &state.constants); + bullet_manager.create_bullet( + player.x - 0x200, + player.y - 0x1000, + btype, + player_id, + Direction::Up, + &state.constants, + ); state.create_caret(player.x - 0x200, player.y - 0x1000, CaretType::Shoot, Direction::Left); } Direction::Right if player.up => { - bullet_manager.create_bullet(player.x + 0x200, player.y - 0x1000, btype, player_id, Direction::Up, &state.constants); + bullet_manager.create_bullet( + player.x + 0x200, + player.y - 0x1000, + btype, + player_id, + Direction::Up, + &state.constants, + ); state.create_caret(player.x + 0x200, player.y - 0x1000, CaretType::Shoot, Direction::Left); } Direction::Left if player.down => { - bullet_manager.create_bullet(player.x - 0x200, player.y + 0x1000, btype, player_id, Direction::Bottom, &state.constants); + bullet_manager.create_bullet( + player.x - 0x200, + player.y + 0x1000, + btype, + player_id, + Direction::Bottom, + &state.constants, + ); state.create_caret(player.x - 0x200, player.y + 0x1000, CaretType::Shoot, Direction::Left); } Direction::Right if player.down => { - bullet_manager.create_bullet(player.x + 0x200, player.y + 0x1000, btype, player_id, Direction::Bottom, &state.constants); + bullet_manager.create_bullet( + player.x + 0x200, + player.y + 0x1000, + btype, + player_id, + Direction::Bottom, + &state.constants, + ); state.create_caret(player.x + 0x200, player.y + 0x1000, CaretType::Shoot, Direction::Left); } Direction::Left => { - bullet_manager.create_bullet(player.x - 0xc00, player.y + 0x600, btype, player_id, Direction::Left, &state.constants); - state.create_caret(player.x - 0xc00, player.y + 0x600, CaretType::Shoot, Direction::Left); + bullet_manager.create_bullet( + player.x - 0xc00, + player.y + 0x600, + btype, + player_id, + Direction::Left, + &state.constants, + ); + state.create_caret(player.x - 0x1800, player.y + 0x600, CaretType::Shoot, Direction::Left); } Direction::Right => { - bullet_manager.create_bullet(player.x + 0xc00, player.y + 0x600, btype, player_id, Direction::Right, &state.constants); - state.create_caret(player.x + 0xc00, player.y + 0x600, CaretType::Shoot, Direction::Right); + bullet_manager.create_bullet( + player.x + 0xc00, + player.y + 0x600, + btype, + player_id, + Direction::Right, + &state.constants, + ); + state.create_caret(player.x + 0x1800, player.y + 0x600, CaretType::Shoot, Direction::Right); } _ => {} }