item flashing
This commit is contained in:
@@ -8,9 +8,7 @@ use crate::entities::item::Item;
|
||||
use crate::entities::item::ItemBundle;
|
||||
use crate::entities::item::ItemName;
|
||||
|
||||
// System to reduce stain time over time
|
||||
pub fn stain_fade_system(time: Res<Time>, mut items: Query<&mut Item>) {
|
||||
// Fade stains every 10 seconds
|
||||
if time.elapsed_secs_f64() as u32 % 10 == 0 {
|
||||
for mut item in items.iter_mut() {
|
||||
item.reduce_stain_time(1);
|
||||
@@ -18,7 +16,7 @@ pub fn stain_fade_system(time: Res<Time>, mut items: Query<&mut Item>) {
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function to create a decorated item
|
||||
// Helper function to create a decorated item (DEMO ONLY)
|
||||
pub fn create_decorated_item(
|
||||
commands: &mut Commands,
|
||||
item_type: ItemType,
|
||||
|
||||
Reference in New Issue
Block a user