From 898eaf659a32746a5cb3bdb9cf669a1df1d2c866 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sun, 1 Oct 2023 19:24:37 +0400 Subject: [PATCH 1/2] particles --- res/shaders/colorize.tres | 4 ++-- src/models/enemies/ghost/Ghost.tscn | 2 +- src/scenes/game/Game.tscn | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/res/shaders/colorize.tres b/res/shaders/colorize.tres index dcdce01..f7d36b5 100644 --- a/res/shaders/colorize.tres +++ b/res/shaders/colorize.tres @@ -15,5 +15,5 @@ void fragment(){ [resource] shader = SubResource( 3 ) -shader_param/active = true -shader_param/color = Color( 1, 1, 1, 0 ) +shader_param/active = false +shader_param/color = Color( 1, 1, 1, 1 ) diff --git a/src/models/enemies/ghost/Ghost.tscn b/src/models/enemies/ghost/Ghost.tscn index aa033cc..26cf08f 100644 --- a/src/models/enemies/ghost/Ghost.tscn +++ b/src/models/enemies/ghost/Ghost.tscn @@ -15,7 +15,7 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" -frame = 1 +frame = 2 playing = true centered = false diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 88c6a6a..022ef5e 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -92,6 +92,15 @@ position = Vector2( 509, 100 ) [node name="Rat" parent="View/Enemies" instance=ExtResource( 17 )] position = Vector2( 93, 72 ) +[node name="CPUParticles2D" type="CPUParticles2D" parent="View"] +position = Vector2( 160, 90 ) +amount = 6 +lifetime = 3.0 +emission_shape = 2 +emission_rect_extents = Vector2( 160, 60 ) +gravity = Vector2( 0, -9 ) +color = Color( 0.133333, 0.133333, 0.137255, 1 ) + [node name="UIWrapper" type="CanvasLayer" parent="."] layer = 3 From 160a860fef05018b69e0651d67d32e0d824c7b9f Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sun, 1 Oct 2023 19:27:43 +0400 Subject: [PATCH 2/2] particles --- src/scenes/game/Game.tscn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 94a15ca..1c2a3bc 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -88,6 +88,15 @@ position = Vector2( 142, 54 ) [node name="Ghost" parent="View/Enemies" instance=ExtResource( 15 )] position = Vector2( 509, 100 ) +[node name="CPUParticles2D" type="CPUParticles2D" parent="View"] +position = Vector2( 160, 90 ) +amount = 9 +lifetime = 3.0 +emission_shape = 2 +emission_rect_extents = Vector2( 160, 60 ) +gravity = Vector2( 0, -9 ) +color = Color( 0.133333, 0.133333, 0.137255, 1 ) + [node name="UIWrapper" type="CanvasLayer" parent="."] layer = 3