From 8e4de800151687a5f2afd605a6b509269d4ed795 Mon Sep 17 00:00:00 2001 From: Linus-Mussmaecher Date: Fri, 12 Apr 2024 00:25:17 +0200 Subject: [PATCH] Added second player --- src/main.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main.rs b/src/main.rs index 2e90ff2..6107fcd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,6 +58,25 @@ impl Game for OrbitsInstance { ], }), }, + // Ship + SpaceObject { + position: Point::from([-256.0, 0.0]), + velocity: Vector::from([0.0, -0.6]), + angle: 0.0, + mass: 1.0, + sprite: ship.clone(), + size: 16.0, + ship: Some(ShipInfo { + shot_cd: 0.0, + fuel: 1.0, + keymap: [ + keyboard::KeyCode::I, + keyboard::KeyCode::J, + keyboard::KeyCode::L, + keyboard::KeyCode::K, + ], + }), + }, // Sun SpaceObject { position: Point::from([0.0, 0.0]),