Initial tile push with item cycle

This commit is contained in:
StephenAdamson
2024-12-12 17:19:59 +00:00
parent 5a56da91bb
commit 7bab01ee74
15 changed files with 5163 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
use bevy::prelude::*;
#[derive(Component)]
#[require(Sprite,Transform,Visibility )]
pub struct Item {
wear: u8,
quality: u8,
weight: u8,
stain_time: u16
}
impl Default for Item {
fn default() -> Self {
Self {
wear: 0,
quality: 0,
weight: 0,
stain_time: 16,
}
}
}
impl Item {
pub fn new() -> Self {
Self {
..Default::default()
}
}
}
#[derive(Bundle)]
pub struct ItemBundle {
pub item: Item,
pub transform: Transform,
pub sprite: Sprite,
pub visibility: Visibility
}
#[derive(Component)]
pub struct Nameable {
pub name: String
}
#[derive(Component)]
pub struct Compostable {
decay: u8,
}