mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Make use of egui_inspect
This commit is contained in:
parent
85ebea1fca
commit
a11d69eee2
11 changed files with 154 additions and 40 deletions
10
src/game.rs
10
src/game.rs
|
|
@ -1,5 +1,7 @@
|
|||
mod player;
|
||||
|
||||
use derivative::Derivative;
|
||||
use egui_inspect::derive::Inspect;
|
||||
use sfml::{
|
||||
graphics::{
|
||||
glsl::{Vec2, Vec4},
|
||||
|
|
@ -20,20 +22,26 @@ use crate::{
|
|||
|
||||
use self::player::Player;
|
||||
|
||||
#[derive(Derivative, Inspect)]
|
||||
#[derivative(Debug)]
|
||||
pub struct GameState {
|
||||
pub camera_offset: WorldPos,
|
||||
#[opaque]
|
||||
pub world: World,
|
||||
pub player: Player,
|
||||
pub gravity: f32,
|
||||
pub tile_to_place: TileId,
|
||||
pub current_biome: Biome,
|
||||
pub prev_biome: Biome,
|
||||
#[derivative(Debug = "ignore")]
|
||||
#[opaque]
|
||||
pub worldgen: Worldgen,
|
||||
pub ambient_light: f32,
|
||||
#[opaque]
|
||||
pub clock: SfBox<Clock>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Copy)]
|
||||
#[derive(PartialEq, Eq, Clone, Copy, Debug, Inspect)]
|
||||
pub enum Biome {
|
||||
Surface,
|
||||
Underground,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue