~starkingdoms/starkingdoms

ref: b072b09c00e6892310c6ee9187f441e95ae89ccf starkingdoms/crates/unified/src/config/world.rs -rw-r--r-- 690 bytes
b072b09c — core feat: part & attachment beginnings 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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,
    pub hearty: HeartyConfig,
}

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

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

#[derive(Deserialize, Asset, TypePath, Clone)]
pub struct HeartyConfig {
    pub thrust: f32,
    pub spawn_at: String,
}