preparation of building asset structure
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use bevy::reflect::Reflect;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Default, Reflect, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BuildingIdentifier(pub usize);
|
||||
|
||||
impl From<i32> for BuildingIdentifier {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
use bevy::prelude::Resource;
|
||||
use bevy::reflect::Reflect;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use world_generation::hex_utils::HexCoord;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[derive(Serialize, Deserialize, Debug, Reflect)]
|
||||
pub struct ResourceIdentifier {
|
||||
pub id: u32,
|
||||
pub qty: u32,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Reflect)]
|
||||
pub struct UnitIdentifier(u32);
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Reflect)]
|
||||
pub struct TileIdentifier(u32);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use bevy::reflect::Reflect;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod building;
|
||||
@@ -17,3 +18,17 @@ pub enum Tier {
|
||||
Three,
|
||||
Superior,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Reflect)]
|
||||
pub enum StatusEffect {
|
||||
UnitRange(f32),
|
||||
UnitAttack(f32),
|
||||
UnitHealth(f32),
|
||||
StructureRange(f32),
|
||||
StructureAttack(f32),
|
||||
StructureHealth(f32),
|
||||
BuildSpeedMulti(f32),
|
||||
BuildCostMulti(f32),
|
||||
ConsumptionMulti(f32),
|
||||
ProductionMulti(f32),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user