~starkingdoms/starkingdoms

ref: 4fb7a538004c7b3fb5880cf3e71dbd782e877910 starkingdoms/crates/unified/src/config/world.rs -rw-r--r-- 464 bytes
4fb7a538 — core gravity 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use bevy::asset::Asset;
use bevy::prelude::TypePath;
use serde::Deserialize;

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct GlobalWorldConfig {
    pub world: WorldConfig,
    pub part: PartConfig,
}

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct WorldConfig {
    pub gravity: f32
}

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct PartConfig {
    pub default_width: f32,
    pub default_height: f32,
    pub default_mass: f32
}