crude save/load system
This commit is contained in:
@@ -1,26 +1,27 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy_ecs_tilemap::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::camera;
|
||||
|
||||
pub struct GridPlugin;
|
||||
|
||||
#[derive(Debug, Component, Reflect)]
|
||||
#[derive(Debug, Component, Reflect, Serialize, Deserialize)]
|
||||
#[reflect(Component)]
|
||||
pub struct Tile {
|
||||
pub x: isize,
|
||||
pub y: isize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Component, Reflect)]
|
||||
#[derive(Debug, Component, Reflect, Serialize, Deserialize)]
|
||||
#[reflect(Component)]
|
||||
pub struct Flag;
|
||||
|
||||
#[derive(Debug, Component, Reflect)]
|
||||
#[derive(Debug, Component, Reflect, Serialize, Deserialize)]
|
||||
#[reflect(Component)]
|
||||
pub struct Revealed;
|
||||
|
||||
#[derive(Debug, Component, Reflect, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Component, Reflect, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[reflect(Component)]
|
||||
pub enum TileType {
|
||||
Empty,
|
||||
@@ -51,7 +52,8 @@ impl From<i32> for TileType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Component)]
|
||||
#[derive(Debug, Component, Reflect, Serialize, Deserialize)]
|
||||
#[reflect(Component)]
|
||||
pub struct TileOffset {
|
||||
pub translation: Vec3,
|
||||
pub x: isize,
|
||||
|
Reference in New Issue
Block a user