mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-07-02 01:27:39 +00:00
uh change idea
This commit is contained in:
parent
fc83ab8452
commit
684fdd5558
5 changed files with 70 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -3235,7 +3235,7 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "mgd2-tram-championships"
|
||||
name = "mgd2-demonic-posession"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "mgd2-tram-championships"
|
||||
name = "mgd2-demonic-posession"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
|
|
40
src/bin/mapgen.rs
Normal file
40
src/bin/mapgen.rs
Normal file
|
@ -0,0 +1,40 @@
|
|||
#![allow(unused)]
|
||||
|
||||
struct Piece {
|
||||
size: (usize, usize),
|
||||
passages: Vec<Passage>,
|
||||
}
|
||||
|
||||
struct Passage {
|
||||
orientation: Orientation,
|
||||
size: PassageSize,
|
||||
side: Direction,
|
||||
position: usize,
|
||||
ptype: Option<PassageType>,
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
10
src/game.rs
10
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<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Gameplay system set. All functions in this control the gameplay (duh).
|
||||
#[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
|
@ -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<Entity, With<Camera3d>>) {
|
||||
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!")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue