From 6028efa329ec3597f8397b0cb840e4dd0c2c64d2 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Mon, 20 Feb 2023 22:26:10 -0500 Subject: [PATCH] depth effect in abyss --- maps/abyss.tscn | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/maps/abyss.tscn b/maps/abyss.tscn index 9c1ddbe..cb3704f 100644 --- a/maps/abyss.tscn +++ b/maps/abyss.tscn @@ -11,7 +11,9 @@ [ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=9] [ext_resource path="res://graphics/particles/bubble.png" type="Texture" id=10] [ext_resource path="res://objects/enemy/mine.tscn" type="PackedScene" id=11] -[ext_resource path="res://objects/enemy/spider.tscn" type="PackedScene" id=12] + +[sub_resource type="CanvasItemMaterial" id=12] +blend_mode = 3 [sub_resource type="ShaderMaterial" id=1] shader = ExtResource( 4 ) @@ -129,24 +131,35 @@ respawn_h = false [node name="BackgroundLayer" type="CanvasLayer" parent="."] layer = -50 -[node name="ColorRect" type="ColorRect" parent="BackgroundLayer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = 384.0 -margin_bottom = 384.0 -color = Color( 0.168627, 0.556863, 0.572549, 0.247059 ) - [node name="Sprite" type="Sprite" parent="BackgroundLayer"] texture = ExtResource( 3 ) centered = false [node name="EffectLayer" type="CanvasLayer" parent="."] layer = 50 +follow_viewport_enable = true + +[node name="Depth1" type="ColorRect" parent="EffectLayer"] +material = SubResource( 12 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 192.0 +margin_bottom = 192.0 +color = Color( 0.784314, 0.784314, 0.784314, 1 ) + +[node name="Depth2" type="ColorRect" parent="EffectLayer"] +material = SubResource( 12 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 384.0 +margin_bottom = 384.0 +color = Color( 0.768627, 0.556863, 0.556863, 1 ) [node name="WaterRipple" type="ColorRect" parent="EffectLayer"] material = SubResource( 1 ) anchor_right = 1.0 anchor_bottom = 1.0 +margin_bottom = 384.0 color = Color( 0.054902, 0.0666667, 0.329412, 1 ) [node name="Bubbles" type="CPUParticles2D" parent="EffectLayer"] @@ -215,7 +228,3 @@ position = Vector2( 144, 24 ) [node name="Mine4" parent="Enemies/Mines" instance=ExtResource( 11 )] position = Vector2( 72, 48 ) - -[node name="Spider" parent="Enemies/Mines" instance=ExtResource( 12 )] -position = Vector2( 128, 160 ) -down_boundary = 4