From 0fc71532e2a03a5c6040275b6f9ea5333c96a065 Mon Sep 17 00:00:00 2001 From: Rendo Date: Thu, 26 Jun 2025 21:18:59 +0500 Subject: [PATCH] Improve flash --- .gitignore | 3 ++- project.godot | 2 ++ scenes/entities/Zombies/zombie.tscn | 2 +- scripts/components/FlashComponent.cs | 2 +- scripts/systems/GameRegistry.cs | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f46899a..89421e0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ export_presets.cfg data_*/ mono_crash.*.json -puki.txt \ No newline at end of file +puki.txt +export \ No newline at end of file diff --git a/project.godot b/project.godot index f4e5722..b6691c5 100644 --- a/project.godot +++ b/project.godot @@ -83,6 +83,8 @@ cheat_zombie_spawn={ 2d_physics/layer_3="Plants Full" 2d_physics/layer_4="Zombies LD" 2d_physics/layer_5="Zombies Full" +2d_physics/layer_7="FallLine" +2d_physics/layer_8="FallParticles" [rendering] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 53a6d26..7322af9 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -14,7 +14,7 @@ [sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"] resource_local_to_scene = true shader = ExtResource("2_srwwe") -shader_parameter/blend_color = Color(1, 1, 1, 1) +shader_parameter/blend_color = Color(0.73, 0.73, 0.73, 1) shader_parameter/amount = 0.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] diff --git a/scripts/components/FlashComponent.cs b/scripts/components/FlashComponent.cs index 4917fe0..8334abd 100644 --- a/scripts/components/FlashComponent.cs +++ b/scripts/components/FlashComponent.cs @@ -26,7 +26,7 @@ public partial class FlashComponent : CanvasGroup _tween = CreateTween(); Action action = SetAmount; - _tween.TweenMethod(Callable.From(action),1.0f,0.0f,_flashDuration); + _tween.TweenMethod(Callable.From(action),0.8f,0.0f,_flashDuration); } private void SetAmount(float amount) diff --git a/scripts/systems/GameRegistry.cs b/scripts/systems/GameRegistry.cs index 6f30736..0687d89 100644 --- a/scripts/systems/GameRegistry.cs +++ b/scripts/systems/GameRegistry.cs @@ -13,7 +13,7 @@ public partial class GameRegistry : Node public override void _Ready() { //Plant init - string[] plantFiles = DirAccess.GetFilesAt(PLANT_RESOURCE_PATH); + string[] plantFiles = ResourceLoader.ListDirectory(PLANT_RESOURCE_PATH); foreach (var file in plantFiles) { @@ -26,7 +26,7 @@ public partial class GameRegistry : Node } //Zombie init - string[] zombieFiles = DirAccess.GetFilesAt(ZOMBIE_RESOURCE_PATH); + string[] zombieFiles = ResourceLoader.ListDirectory(ZOMBIE_RESOURCE_PATH); foreach (var file in zombieFiles) {