From 684fdd5558aab2c2b112e2961e3c0d5e233ba849 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 10 Jun 2025 20:11:08 +0200 Subject: [PATCH] uh change idea --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/bin/mapgen.rs | 40 ++++++++++++++++++++++++++++++++++++++++ src/game.rs | 10 ++++++++++ src/game/camera.rs | 19 ++++++++++++++++++- 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 src/bin/mapgen.rs diff --git a/Cargo.lock b/Cargo.lock index 661cf15..48218db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3235,7 +3235,7 @@ dependencies = [ ] [[package]] -name = "mgd2-tram-championships" +name = "mgd2-demonic-posession" version = "0.1.0" dependencies = [ "bevy", diff --git a/Cargo.toml b/Cargo.toml index 54f2104..884b355 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mgd2-tram-championships" +name = "mgd2-demonic-posession" version = "0.1.0" edition = "2024" diff --git a/src/bin/mapgen.rs b/src/bin/mapgen.rs new file mode 100644 index 0000000..a428b0a --- /dev/null +++ b/src/bin/mapgen.rs @@ -0,0 +1,40 @@ +#![allow(unused)] + +struct Piece { + size: (usize, usize), + passages: Vec, +} + +struct Passage { + orientation: Orientation, + size: PassageSize, + side: Direction, + position: usize, + ptype: Option, +} + +struct PassageSize { + height: usize, + width: usize, +} + +enum PassageType { + Entrance, + Exit, +} + +enum Direction { + North, + East, + South, + West, +} + +enum Orientation { + Horizontal, + Vertical, +} + +fn main() { + println!("hello world") +} diff --git a/src/game.rs b/src/game.rs index 6b69f1b..8120eb6 100644 --- a/src/game.rs +++ b/src/game.rs @@ -7,6 +7,16 @@ use crate::{ mod camera; mod scene; +mod tram { + use bevy::prelude::*; + + fn spawn_tram( + mut c: Commands, + mut meshes: ResMut>, + mut materials: ResMut>, + ) { + } +} /// Gameplay system set. All functions in this control the gameplay (duh). #[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)] diff --git a/src/game/camera.rs b/src/game/camera.rs index f0bcd66..0e30926 100644 --- a/src/game/camera.rs +++ b/src/game/camera.rs @@ -18,7 +18,24 @@ pub fn plugin(app: &mut App) { /// Adds [ThirdPersonCamera] to our existing camera. pub fn setup_game_camera(mut c: Commands, cam: Single>) { - c.entity(*cam).insert(ThirdPersonCamera::default()); + c.entity(*cam).insert(ThirdPersonCamera { + cursor_lock_key: KeyCode::Space, + cursor_lock_toggle_enabled: true, + gamepad_settings: CustomGamepadSettings::default(), + cursor_lock_active: true, + sensitivity: Vec2::new(1.0, 1.0), + mouse_orbit_button_enabled: true, + mouse_orbit_button: MouseButton::Middle, + offset_enabled: false, + offset: Offset::new(0.5, 0.4), + offset_toggle_enabled: false, + offset_toggle_speed: 5.0, + offset_toggle_key: KeyCode::KeyE, + zoom_enabled: true, + zoom: Zoom::new(1.5, 30.0), + zoom_sensitivity: 1.0, + ..Default::default() + }); info!("Third person camera set up!") }