diff --git a/assets/dog/tile000.png b/assets/dog/tile000.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile000.png differ diff --git a/assets/dog/tile001.png b/assets/dog/tile001.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile001.png differ diff --git a/assets/dog/tile002.png b/assets/dog/tile002.png new file mode 100644 index 0000000..4be74e9 Binary files /dev/null and b/assets/dog/tile002.png differ diff --git a/assets/dog/tile003.png b/assets/dog/tile003.png new file mode 100644 index 0000000..1a581f4 Binary files /dev/null and b/assets/dog/tile003.png differ diff --git a/assets/dog/tile004.png b/assets/dog/tile004.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile004.png differ diff --git a/assets/dog/tile005.png b/assets/dog/tile005.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile005.png differ diff --git a/assets/dog/tile006.png b/assets/dog/tile006.png new file mode 100644 index 0000000..a737547 Binary files /dev/null and b/assets/dog/tile006.png differ diff --git a/assets/dog/tile007.png b/assets/dog/tile007.png new file mode 100644 index 0000000..5121f1b Binary files /dev/null and b/assets/dog/tile007.png differ diff --git a/assets/dog/tile008.png b/assets/dog/tile008.png new file mode 100644 index 0000000..ab9a8e1 Binary files /dev/null and b/assets/dog/tile008.png differ diff --git a/assets/dog/tile009.png b/assets/dog/tile009.png new file mode 100644 index 0000000..8369207 Binary files /dev/null and b/assets/dog/tile009.png differ diff --git a/assets/dog/tile010.png b/assets/dog/tile010.png new file mode 100644 index 0000000..5121f1b Binary files /dev/null and b/assets/dog/tile010.png differ diff --git a/assets/dog/tile011.png b/assets/dog/tile011.png new file mode 100644 index 0000000..ab9a8e1 Binary files /dev/null and b/assets/dog/tile011.png differ diff --git a/assets/dog/tile012.png b/assets/dog/tile012.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile012.png differ diff --git a/assets/dog/tile013.png b/assets/dog/tile013.png new file mode 100644 index 0000000..6507a2e Binary files /dev/null and b/assets/dog/tile013.png differ diff --git a/assets/dog/tile014.png b/assets/dog/tile014.png new file mode 100644 index 0000000..a90ef26 Binary files /dev/null and b/assets/dog/tile014.png differ diff --git a/assets/dog/tile015.png b/assets/dog/tile015.png new file mode 100644 index 0000000..a90ef26 Binary files /dev/null and b/assets/dog/tile015.png differ diff --git a/assets/sheep/tile000.png b/assets/sheep/tile000.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile000.png and b/assets/sheep/tile000.png differ diff --git a/assets/sheep/tile001.png b/assets/sheep/tile001.png index 9be068a..9183556 100644 Binary files a/assets/sheep/tile001.png and b/assets/sheep/tile001.png differ diff --git a/assets/sheep/tile002.png b/assets/sheep/tile002.png index 407ea52..43d8105 100644 Binary files a/assets/sheep/tile002.png and b/assets/sheep/tile002.png differ diff --git a/assets/sheep/tile003.png b/assets/sheep/tile003.png index 607a060..30770a7 100644 Binary files a/assets/sheep/tile003.png and b/assets/sheep/tile003.png differ diff --git a/assets/sheep/tile004.png b/assets/sheep/tile004.png index 607a060..30770a7 100644 Binary files a/assets/sheep/tile004.png and b/assets/sheep/tile004.png differ diff --git a/assets/sheep/tile005.png b/assets/sheep/tile005.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile005.png and b/assets/sheep/tile005.png differ diff --git a/assets/sheep/tile006.png b/assets/sheep/tile006.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile006.png and b/assets/sheep/tile006.png differ diff --git a/assets/sheep/tile007.png b/assets/sheep/tile007.png index 7cf4058..00fbce3 100644 Binary files a/assets/sheep/tile007.png and b/assets/sheep/tile007.png differ diff --git a/assets/sheep/tile008.png b/assets/sheep/tile008.png index 7cf4058..375ea61 100644 Binary files a/assets/sheep/tile008.png and b/assets/sheep/tile008.png differ diff --git a/assets/sheep/tile009.png b/assets/sheep/tile009.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile009.png and b/assets/sheep/tile009.png differ diff --git a/assets/sheep/tile010.png b/assets/sheep/tile010.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile010.png and b/assets/sheep/tile010.png differ diff --git a/assets/sheep/tile011.png b/assets/sheep/tile011.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile011.png and b/assets/sheep/tile011.png differ diff --git a/assets/sheep/tile012.png b/assets/sheep/tile012.png index e5d2ae3..938283a 100644 Binary files a/assets/sheep/tile012.png and b/assets/sheep/tile012.png differ diff --git a/assets/sheep/tile013.png b/assets/sheep/tile013.png index e5d2ae3..938283a 100644 Binary files a/assets/sheep/tile013.png and b/assets/sheep/tile013.png differ diff --git a/assets/sheep/tile014.png b/assets/sheep/tile014.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile014.png and b/assets/sheep/tile014.png differ diff --git a/assets/sheep/tile015.png b/assets/sheep/tile015.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile015.png and b/assets/sheep/tile015.png differ diff --git a/assets/sheep/tile016.png b/assets/sheep/tile016.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile016.png and b/assets/sheep/tile016.png differ diff --git a/assets/sheep/tile017.png b/assets/sheep/tile017.png index 6b8be62..5782831 100644 Binary files a/assets/sheep/tile017.png and b/assets/sheep/tile017.png differ diff --git a/assets/sheep/tile018.png b/assets/sheep/tile018.png index 7cf4058..00fbce3 100644 Binary files a/assets/sheep/tile018.png and b/assets/sheep/tile018.png differ diff --git a/assets/sheep/tile019.png b/assets/sheep/tile019.png index 7cf4058..00fbce3 100644 Binary files a/assets/sheep/tile019.png and b/assets/sheep/tile019.png differ diff --git a/assets/sheep/tile020.png b/assets/sheep/tile020.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile020.png and b/assets/sheep/tile020.png differ diff --git a/assets/sheep/tile021.png b/assets/sheep/tile021.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile021.png and b/assets/sheep/tile021.png differ diff --git a/assets/sheep/tile022.png b/assets/sheep/tile022.png index 9155c5b..eedd8bc 100644 Binary files a/assets/sheep/tile022.png and b/assets/sheep/tile022.png differ diff --git a/assets/sheep/tile023.png b/assets/sheep/tile023.png index 9155c5b..eedd8bc 100644 Binary files a/assets/sheep/tile023.png and b/assets/sheep/tile023.png differ diff --git a/assets/sheep/tile024.png b/assets/sheep/tile024.png index 3175653..8b787f8 100644 Binary files a/assets/sheep/tile024.png and b/assets/sheep/tile024.png differ diff --git a/assets/sheep/tile025.png b/assets/sheep/tile025.png index 3175653..8b787f8 100644 Binary files a/assets/sheep/tile025.png and b/assets/sheep/tile025.png differ diff --git a/assets/sheep/tile026.png b/assets/sheep/tile026.png index ea830e3..b669c98 100644 Binary files a/assets/sheep/tile026.png and b/assets/sheep/tile026.png differ diff --git a/assets/sheep/tile027.png b/assets/sheep/tile027.png index ea830e3..b669c98 100644 Binary files a/assets/sheep/tile027.png and b/assets/sheep/tile027.png differ diff --git a/assets/sheep/tile028.png b/assets/sheep/tile028.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile028.png and b/assets/sheep/tile028.png differ diff --git a/assets/sheep/tile029.png b/assets/sheep/tile029.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile029.png and b/assets/sheep/tile029.png differ diff --git a/assets/sheep/tile030.png b/assets/sheep/tile030.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile030.png and b/assets/sheep/tile030.png differ diff --git a/assets/sheep/tile031.png b/assets/sheep/tile031.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile031.png and b/assets/sheep/tile031.png differ diff --git a/assets/sheep/tile032.png b/assets/sheep/tile032.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile032.png and b/assets/sheep/tile032.png differ diff --git a/assets/sheep/tile033.png b/assets/sheep/tile033.png index 49b64b8..ce3e657 100644 Binary files a/assets/sheep/tile033.png and b/assets/sheep/tile033.png differ diff --git a/assets/sheep/tile034.png b/assets/sheep/tile034.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile034.png and b/assets/sheep/tile034.png differ diff --git a/assets/sheep/tile035.png b/assets/sheep/tile035.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile035.png and b/assets/sheep/tile035.png differ diff --git a/assets/sheep/tile036.png b/assets/sheep/tile036.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile036.png and b/assets/sheep/tile036.png differ diff --git a/assets/sheep/tile037.png b/assets/sheep/tile037.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile037.png and b/assets/sheep/tile037.png differ diff --git a/assets/sheep/tile038.png b/assets/sheep/tile038.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile038.png and b/assets/sheep/tile038.png differ diff --git a/assets/sheep/tile039.png b/assets/sheep/tile039.png index 4238da5..2a89c58 100644 Binary files a/assets/sheep/tile039.png and b/assets/sheep/tile039.png differ diff --git a/src/auto_anim.rs b/src/auto_anim.rs index 4445093..e2c0bc5 100644 --- a/src/auto_anim.rs +++ b/src/auto_anim.rs @@ -1,4 +1,4 @@ -use bevy::prelude::*; +use bevy::{prelude::*, render::render_resource::Face}; use crate::GameSet; @@ -39,7 +39,7 @@ fn auto_anim( ) { for (entity, mut auto_anim) in auto_anim_query.iter_mut() { if auto_anim.timer.tick(time.delta()).just_finished() { - auto_anim.current_frame = (auto_anim.current_frame + 1) % (auto_anim.set.get_index_range().end - auto_anim.set.get_index_range().start); + auto_anim.current_frame = (auto_anim.current_frame + 1) % (auto_anim.set.get_index_range().end + 1 - auto_anim.set.get_index_range().start); commands.entity(entity).insert(materials.materials[ auto_anim.set.get_index_range().start + auto_anim.current_frame ].clone()); @@ -58,6 +58,8 @@ fn init_storage( base_color_texture: Some(asset_server.load(T::get_tile_path(i))), alpha_mode: AlphaMode::Blend, reflectance: 0.1, + double_sided: true, + cull_mode: None, ..default() })); } diff --git a/src/corpse.rs b/src/corpse.rs new file mode 100644 index 0000000..191174a --- /dev/null +++ b/src/corpse.rs @@ -0,0 +1,82 @@ +use bevy::prelude::*; +use rand::Rng; + +use crate::{GameSet, GameStuff}; + +pub struct CorpsePlugin; + +impl Plugin for CorpsePlugin { + fn build(&self, app: &mut App) { + app.add_systems(Update, (corpse_system, spawn_corpse_system).in_set(GameSet::Playing)) + .add_event::() + .add_systems(Startup, setup_corpse_storage); + } +} + +#[derive(Component)] +pub struct Corpse { + pub time : f32 +} + +fn corpse_system( + mut commands : Commands, + time : Res