From 356ab4713a8d4e1dfdb57a1397b0f092f68dab21 Mon Sep 17 00:00:00 2001 From: Wabtey Date: Sun, 19 Feb 2023 00:52:26 +0100 Subject: [PATCH 1/3] cleanup warning --- src/locations/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/locations/mod.rs b/src/locations/mod.rs index 49f1e9a..2d6a5b6 100644 --- a/src/locations/mod.rs +++ b/src/locations/mod.rs @@ -7,9 +7,9 @@ pub mod sensors; #[derive(Clone, Eq, PartialEq, Debug, Hash)] enum Location { - /// The transition universe - /// Used when reset a Level - Void, + // /// The transition universe + // /// Used when reset a Level + // Void, // Start cinematic // LevelZero, LevelOne, From be90f00d78fd54273da3cb585fa8ed3aaf079223 Mon Sep 17 00:00:00 2001 From: Wabtey Date: Fri, 24 Feb 2023 18:16:30 +0100 Subject: [PATCH 2/3] optimize the doors spawn just a clone of the textureAtlax instead of a full reload of the same spritesheet --- src/locations/level_one/mod.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/locations/level_one/mod.rs b/src/locations/level_one/mod.rs index 078ff6c..eeaf2ae 100644 --- a/src/locations/level_one/mod.rs +++ b/src/locations/level_one/mod.rs @@ -221,11 +221,12 @@ fn setup_level_one( TextureAtlas::from_grid(horizontal_door, Vec2::new(12., 3.), 1, 7, None, None); let horizontal_door_atlas_handle = texture_atlases.add(horizontal_door_atlas); - + let horizontal_door_texture_atlas_sprite = TextureAtlasSprite::new(0); commands .spawn(( SpriteSheetBundle { - texture_atlas: horizontal_door_atlas_handle, + texture_atlas: horizontal_door_atlas_handle.clone(), + sprite: horizontal_door_texture_atlas_sprite.clone(), transform: Transform { translation: IN_DOOR_POSITION.into(), scale: LEVEL_SCALE.into(), @@ -269,18 +270,11 @@ fn setup_level_one( )); }); - // XXX: double load on the same sprite_sheet - - let out_horizontal_door = asset_server.load("textures/level_one/horizontal_door_anim.png"); - let out_horizontal_door_atlas = - TextureAtlas::from_grid(out_horizontal_door, Vec2::new(12., 3.), 1, 7, None, None); - - let out_horizontal_door_atlas_handle = texture_atlases.add(out_horizontal_door_atlas); - commands .spawn(( SpriteSheetBundle { - texture_atlas: out_horizontal_door_atlas_handle, + texture_atlas: horizontal_door_atlas_handle.clone(), + sprite: horizontal_door_texture_atlas_sprite.clone(), transform: Transform { translation: OUT_DOOR_POSITION.into(), scale: LEVEL_SCALE.into(), From 9a017c056b64aba06be8321a9b7a455d8977b166 Mon Sep 17 00:00:00 2001 From: Wabtey Date: Sun, 11 Jun 2023 12:27:47 +0200 Subject: [PATCH 3/3] Final Cinematic - add an End - fix: daze cured after the daze_timer ended --- README.md | 11 +- src/characters/npcs/movement.rs | 16 +- src/constants.rs | 16 +- src/locations/cinematics/mod.rs | 193 ++++++++++++ src/locations/level_one/button.rs | 4 +- src/locations/level_one/mod.rs | 491 ++++++++++++++++-------------- src/locations/mod.rs | 53 +++- src/locations/sensors.rs | 25 +- src/main.rs | 10 +- src/spritesheet.rs | 8 +- src/tablet/mind_control/mod.rs | 7 +- 11 files changed, 556 insertions(+), 278 deletions(-) create mode 100644 src/locations/cinematics/mod.rs diff --git a/README.md b/README.md index 19769f6..d567042 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ or in the correct release note (if from other version): ## Rules -***But du jeu*** : Arriver à s’enfuir du Labo +***But du jeu**- : Arriver à s’enfuir du Labo ### Binding @@ -24,6 +24,15 @@ or in the correct release note (if from other version): - `Left Click` on the button *Hack* to hack doors - `Z Q S D` or `W A S D` or `Up Left Down Right` to move +### Future... (lmao) + +- [ ] TODO: LevelScene, CinematicScene + - [ ] TODO: MustHave - Reset the scene when touched (by an enemy) +- [ ] TODO: Background + MovingBubbles +- [x] Final Cinematic + - [x] Animations + - [x] Black Cat, EasterEgg + ### Level Design #### Tutorial diff --git a/src/characters/npcs/movement.rs b/src/characters/npcs/movement.rs index e916700..d28fef6 100644 --- a/src/characters/npcs/movement.rs +++ b/src/characters/npcs/movement.rs @@ -2,7 +2,7 @@ use bevy::prelude::*; use bevy_rapier2d::prelude::*; use crate::{ - characters::movement::{Dazed, Speed}, + characters::{effects::style::DazeAnimation, movement::{Dazed, Speed}}, characters::{npcs::NPC, player::Player}, constants::character::npc::movement::BLACK_CAT_STARTING_POSITION, tablet::mind_control::MindControled, @@ -239,9 +239,10 @@ pub fn daze_wait( mut commands: Commands, time: Res