This commit is contained in:
nora 2023-04-18 12:22:19 +02:00
parent 840e869e4a
commit 41efc35b39
2 changed files with 0 additions and 48 deletions

View file

@ -3,22 +3,6 @@ use std::{fmt::Debug, marker::PhantomData};
use egui_inspect::{derive::Inspect, Inspect}; use egui_inspect::{derive::Inspect, Inspect};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Inspect, PartialEq, Eq)]
pub struct TileId<Layer>(pub u16, PhantomData<Layer>);
impl<Layer> Copy for TileId<Layer> {}
impl<Layer> Clone for TileId<Layer> {
fn clone(&self) -> Self {
Self(self.0, PhantomData)
}
}
impl<Layer> Debug for TileId<Layer> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
loop {}
}
}
#[derive(Serialize, Deserialize, Inspect)] #[derive(Serialize, Deserialize, Inspect)]
pub struct TileDef pub struct TileDef
where where
@ -27,14 +11,6 @@ where
//ADD pub blend_graphic: String, //ADD pub blend_graphic: String,
} }
#[derive(Debug, Inspect, Default, Serialize, Deserialize)]
pub struct MidDef {
/// Platform behavior: Horizontally passable, vertically passable upwards
pub platform: bool,
/// Collision bounding box
pub bb: Option<TileBb>,
}
impl Debug for TileDef impl Debug for TileDef
where where
{ {

View file

@ -3,22 +3,6 @@ use std::{fmt::Debug, marker::PhantomData};
use egui_inspect::{derive::Inspect, Inspect}; use egui_inspect::{derive::Inspect, Inspect};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Inspect, PartialEq, Eq)]
pub struct TileId<Layer>(pub u16, PhantomData<Layer>);
impl<Layer> Copy for TileId<Layer> {}
impl<Layer> Clone for TileId<Layer> {
fn clone(&self) -> Self {
Self(self.0, PhantomData)
}
}
impl<Layer> Debug for TileId<Layer> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
loop {}
}
}
#[derive(Serialize, Deserialize, Inspect)] #[derive(Serialize, Deserialize, Inspect)]
pub struct TileDef pub struct TileDef
where where
@ -27,14 +11,6 @@ where
//ADD pub blend_graphic: String, //ADD pub blend_graphic: String,
} }
#[derive(Debug, Inspect, Default, Serialize, Deserialize)]
pub struct MidDef {
/// Platform behavior: Horizontally passable, vertically passable upwards
pub platform: bool,
/// Collision bounding box
pub bb: Option<TileBb>,
}
impl Debug for TileDef impl Debug for TileDef
where where
{ {