Merge pull request 'feature/interaction_outline' (#13) from feature/interaction_outline into develop
Reviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://blch5kdhkbj75"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://dsa3lv2as7q3b" path="res://shader/outline.gdshader" id="1_awyqf"]
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_awyqf")
|
||||
shader_parameter/allow_out_of_bounds = true
|
||||
shader_parameter/outline_thickness = 8.0
|
||||
shader_parameter/outline_color = Color(0.88, 0.81664, 0.4576, 1)
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://sbf12hin4kes"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://sbf12hin4kes"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bylgmr0skwtrs" path="res://art/farm/farming/farmobjekte/broken tools atlas.png" id="1_k4ca3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
|
||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/intaractable_outline.tres" id="3_ic616"]
|
||||
[ext_resource type="AudioStream" uid="uid://be6g8b3v3u1ai" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PickUp_01.wav" id="3_ktmp7"]
|
||||
[ext_resource type="AudioStream" uid="uid://cgjsajsdrrn0j" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PutDown_01.wav" id="4_ic616"]
|
||||
[ext_resource type="AudioStream" uid="uid://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
|
||||
@@ -30,9 +31,12 @@ stream_9/stream = ExtResource("12_kka6u")
|
||||
[node name="trashObject" type="Sprite2D"]
|
||||
texture = ExtResource("1_k4ca3")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(57, 493, 334, 475)
|
||||
region_rect = Rect2(44, 479, 356, 503)
|
||||
|
||||
[node name="InteractionArea" parent="." instance=ExtResource("2_gcgfd")]
|
||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("2_gcgfd")]
|
||||
position = Vector2(0, -172)
|
||||
_outlineMaterial = ExtResource("3_ic616")
|
||||
_spriteToOutline = NodePath("..")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = SubResource("AudioStreamRandomizer_dich4")
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=48 format=3 uid="uid://dfvgp1my5rydh"]
|
||||
[gd_scene load_steps=49 format=3 uid="uid://dfvgp1my5rydh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c34012j5ukiuf" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0001.png" id="1_03m0b"]
|
||||
[ext_resource type="Script" uid="uid://d2486x6upmwqq" path="res://scripts/GdScript/dialogic_starter.gd" id="1_at1n1"]
|
||||
[ext_resource type="Script" uid="uid://d0kgxh4ykuv23" path="res://scripts/CSharp/Common/NPC/TalkingCharacter.cs" id="1_hn8at"]
|
||||
[ext_resource type="Texture2D" uid="uid://cksf38vypfsae" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0002.png" id="2_hn8at"]
|
||||
[ext_resource type="Texture2D" uid="uid://e8dj27qcpuoo" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0003.png" id="3_ahrat"]
|
||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/intaractable_outline.tres" id="3_pfk7p"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5k63jgxqr0do" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0004.png" id="4_at1n1"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8lkbpi220b5h" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0005.png" id="5_aqu1t"]
|
||||
[ext_resource type="Texture2D" uid="uid://bv5bxpx6vf2h0" path="res://art/animation/Yeli2D/F01-Yeli_Idle/0006.png" id="6_pfk7p"]
|
||||
@@ -192,22 +193,15 @@ y_sort_enabled = true
|
||||
script = ExtResource("1_hn8at")
|
||||
_sprite = NodePath("TalkingControl/AnimatedSprite")
|
||||
|
||||
[node name="InteractionArea" parent="." instance=ExtResource("42_ahrat")]
|
||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("42_ahrat")]
|
||||
position = Vector2(0, -450)
|
||||
scale = Vector2(2.805, 2.805)
|
||||
_outlineMaterial = ExtResource("3_pfk7p")
|
||||
_spriteToOutline = NodePath("../TalkingControl/AnimatedSprite")
|
||||
|
||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_at1n1")
|
||||
|
||||
[node name="Label" parent="InteractionArea" index="1"]
|
||||
custom_minimum_size = Vector2(10, 10)
|
||||
offset_left = -127.273
|
||||
offset_top = -245.633
|
||||
offset_right = 119.727
|
||||
offset_bottom = -142.633
|
||||
theme_override_font_sizes/font_size = 60
|
||||
text = "[E] talk"
|
||||
|
||||
[node name="TalkingControl" type="Node2D" parent="."]
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite2D" parent="TalkingControl"]
|
||||
|
||||
+50
-64
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=23 format=3 uid="uid://muuxxgvx33fp"]
|
||||
[gd_scene load_steps=25 format=3 uid="uid://muuxxgvx33fp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://7m1rt7agb6rm" path="res://scripts/CSharp/Common/Temp/MVPDuck.cs" id="1_54k4r"]
|
||||
[ext_resource type="Texture2D" uid="uid://hvchk6t0xe7j" path="res://art/animals/Ente.png" id="1_cgxhx"]
|
||||
@@ -16,6 +16,7 @@
|
||||
[ext_resource type="Animation" uid="uid://b3dwd88uvfk1k" path="res://art/animals/duck_flapFlap.res" id="14_uo3dh"]
|
||||
[ext_resource type="AudioStream" uid="uid://bsr5m8u2sle5k" path="res://audio/sfx/Animals/SFX_Duck_Wings_07.wav" id="14_xhefb"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="15_uo3dh"]
|
||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/intaractable_outline.tres" id="16_nxoeu"]
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_sot7i"]
|
||||
streams_count = 4
|
||||
@@ -39,7 +40,7 @@ length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("bodyLookingRight/wingR:rotation")
|
||||
tracks/0/path = NodePath("SubViewport/bodyLookingRight/wingR:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
@@ -51,7 +52,7 @@ tracks/0/keys = {
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("bodyLookingRight/wingL:rotation")
|
||||
tracks/1/path = NodePath("SubViewport/bodyLookingRight/wingL:rotation")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
@@ -63,7 +64,7 @@ tracks/1/keys = {
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("bodyLookingRight/head:rotation")
|
||||
tracks/2/path = NodePath("SubViewport/bodyLookingRight/head:rotation")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
@@ -75,7 +76,7 @@ tracks/2/keys = {
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("bodyLookingRight/head/beak upper:rotation")
|
||||
tracks/3/path = NodePath("SubViewport/bodyLookingRight/head/beak upper:rotation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
@@ -87,7 +88,7 @@ tracks/3/keys = {
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("bodyLookingRight/head/beak lower:rotation")
|
||||
tracks/4/path = NodePath("SubViewport/bodyLookingRight/head/beak lower:rotation")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
@@ -135,6 +136,9 @@ _data = {
|
||||
resource_local_to_scene = true
|
||||
radius = 443.041
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_4830j"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="Duck" type="Node2D" node_paths=PackedStringArray("_animationPlayer")]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
@@ -157,16 +161,28 @@ libraries = {
|
||||
&"": SubResource("AnimationLibrary_54k4r")
|
||||
}
|
||||
|
||||
[node name="bodyLookingRight" type="Node2D" parent="."]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(-5, -537)
|
||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("15_uo3dh")]
|
||||
position = Vector2(18, -250)
|
||||
_outlineMaterial = ExtResource("16_nxoeu")
|
||||
_spriteToOutline = NodePath("../Duck rendered")
|
||||
|
||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_uo3dh")
|
||||
|
||||
[node name="Duck rendered" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -250)
|
||||
texture = SubResource("ViewportTexture_4830j")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(400, 600)
|
||||
|
||||
[node name="bodyLookingRight" type="Node2D" parent="SubViewport"]
|
||||
position = Vector2(200, 550)
|
||||
rotation = 0.0135349
|
||||
|
||||
[node name="head" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(46.9624, 76.1606)
|
||||
[node name="head" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(45.706, -451.714)
|
||||
rotation = 0.284615
|
||||
scale = Vector2(1, 0.997)
|
||||
skew = 0.024546
|
||||
@@ -175,9 +191,8 @@ offset = Vector2(25.2328, -23.0689)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(45, 24, 87, 82)
|
||||
|
||||
[node name="beak upper" type="Sprite2D" parent="bodyLookingRight/head"]
|
||||
[node name="beak upper" type="Sprite2D" parent="SubViewport/bodyLookingRight/head"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(50.669, -7.16257)
|
||||
rotation = -0.0427724
|
||||
scale = Vector2(0.62715, 0.62715)
|
||||
@@ -186,9 +201,7 @@ offset = Vector2(57.1263, -7.47815)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(292, 37, 152, 98)
|
||||
|
||||
[node name="beak lower" type="Sprite2D" parent="bodyLookingRight/head"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
[node name="beak lower" type="Sprite2D" parent="SubViewport/bodyLookingRight/head"]
|
||||
position = Vector2(47.9076, -15.7341)
|
||||
rotation = 0.0364142
|
||||
scale = Vector2(0.58615, 0.58615)
|
||||
@@ -197,30 +210,24 @@ offset = Vector2(60.4601, 37.8134)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(295, 170, 145, 39)
|
||||
|
||||
[node name="torso" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(5.90997, 355.352)
|
||||
[node name="torso" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(4.65357, -172.523)
|
||||
scale = Vector2(1.07526, 1.01724)
|
||||
texture = ExtResource("1_cgxhx")
|
||||
offset = Vector2(2.87376, -131.092)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(30, 168, 125, 326)
|
||||
|
||||
[node name="wingR" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(-28, 262)
|
||||
[node name="wingR" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(-29.2564, -265.875)
|
||||
rotation = -0.371117
|
||||
texture = ExtResource("1_cgxhx")
|
||||
offset = Vector2(-50, 50)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(196, 231, 180, 164)
|
||||
|
||||
[node name="wingL" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(47.0695, 245.905)
|
||||
[node name="wingL" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(45.8131, -281.97)
|
||||
rotation = -0.0925884
|
||||
skew = -0.0345086
|
||||
texture = ExtResource("1_cgxhx")
|
||||
@@ -228,10 +235,8 @@ offset = Vector2(-59.5924, 55.37)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(196, 231, 180, 164)
|
||||
|
||||
[node name="underbelly" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(-11.4038, 439.203)
|
||||
[node name="underbelly" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(-12.6602, -88.6718)
|
||||
rotation = -2.98225
|
||||
scale = Vector2(0.672245, 0.955267)
|
||||
skew = 0.0185422
|
||||
@@ -240,8 +245,8 @@ offset = Vector2(26.4135, 70.6083)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(196, 231, 180, 164)
|
||||
|
||||
[node name="leg left" type="Sprite2D" parent="bodyLookingRight"]
|
||||
position = Vector2(36.2887, 300.645)
|
||||
[node name="leg left" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(35.0323, -227.23)
|
||||
rotation = 2.42655
|
||||
scale = Vector2(1.05221, 1.04106)
|
||||
skew = -0.0544101
|
||||
@@ -249,7 +254,7 @@ texture = ExtResource("1_cgxhx")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(196, 231, 177, 161)
|
||||
|
||||
[node name="left thigh" type="Sprite2D" parent="bodyLookingRight/leg left"]
|
||||
[node name="left thigh" type="Sprite2D" parent="SubViewport/bodyLookingRight/leg left"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(73.353, -69.771)
|
||||
@@ -259,7 +264,7 @@ texture = ExtResource("1_cgxhx")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(368, 263, 81, 89)
|
||||
|
||||
[node name="left shin" type="Sprite2D" parent="bodyLookingRight/leg left/left thigh"]
|
||||
[node name="left shin" type="Sprite2D" parent="SubViewport/bodyLookingRight/leg left/left thigh"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(-5.71882, 19.9984)
|
||||
@@ -271,7 +276,7 @@ offset = Vector2(10, -50)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(360, 361, 68, 126)
|
||||
|
||||
[node name="left foot" type="Sprite2D" parent="bodyLookingRight/leg left/left thigh/left shin"]
|
||||
[node name="left foot" type="Sprite2D" parent="SubViewport/bodyLookingRight/leg left/left thigh/left shin"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(15.1289, -77.6075)
|
||||
@@ -282,19 +287,15 @@ offset = Vector2(40, 40)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(246, 393, 111, 111)
|
||||
|
||||
[node name="right leg" type="Sprite2D" parent="bodyLookingRight"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
position = Vector2(-24, 364)
|
||||
[node name="right leg" type="Sprite2D" parent="SubViewport/bodyLookingRight"]
|
||||
position = Vector2(-25.2564, -163.875)
|
||||
rotation = -0.463741
|
||||
scale = Vector2(1.07492, 1.01762)
|
||||
texture = ExtResource("1_cgxhx")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(196, 231, 177, 161)
|
||||
|
||||
[node name="right thigh" type="Sprite2D" parent="bodyLookingRight/right leg"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
[node name="right thigh" type="Sprite2D" parent="SubViewport/bodyLookingRight/right leg"]
|
||||
position = Vector2(-29.7603, 44.2374)
|
||||
rotation = 0.249342
|
||||
scale = Vector2(0.625107, 0.655894)
|
||||
@@ -303,9 +304,7 @@ texture = ExtResource("1_cgxhx")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(368, 263, 81, 89)
|
||||
|
||||
[node name="right shin" type="Sprite2D" parent="bodyLookingRight/right leg/right thigh"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
[node name="right shin" type="Sprite2D" parent="SubViewport/bodyLookingRight/right leg/right thigh"]
|
||||
position = Vector2(-2.78734, 11.5692)
|
||||
rotation = 0.0689206
|
||||
scale = Vector2(1.12016, 1.07128)
|
||||
@@ -315,9 +314,7 @@ offset = Vector2(-14.163, 37.0936)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(360, 361, 68, 126)
|
||||
|
||||
[node name="right foot" type="Sprite2D" parent="bodyLookingRight/right leg/right thigh/right shin"]
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
[node name="right foot" type="Sprite2D" parent="SubViewport/bodyLookingRight/right leg/right thigh/right shin"]
|
||||
position = Vector2(-20.0986, 67.7507)
|
||||
rotation = 0.14855
|
||||
scale = Vector2(1.212, 1.212)
|
||||
@@ -326,17 +323,6 @@ offset = Vector2(40, 40)
|
||||
region_enabled = true
|
||||
region_rect = Rect2(246, 393, 111, 111)
|
||||
|
||||
[node name="InteractionArea" parent="." instance=ExtResource("15_uo3dh")]
|
||||
position = Vector2(-3, -274)
|
||||
|
||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_uo3dh")
|
||||
|
||||
[node name="Label" parent="InteractionArea" index="1"]
|
||||
modulate = Color(0, 0, 0, 1)
|
||||
z_index = 1
|
||||
y_sort_enabled = true
|
||||
|
||||
[connection signal="Interacted" from="InteractionArea" to="." method="TransferToTargetAfterDelay"]
|
||||
[connection signal="Interacted" from="InteractionArea" to="Audio/NakNak" method="PlayOneShot"]
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dpbbroif2tnil"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dpbbroif2tnil"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://btusf04xnywhm" path="res://scripts/CSharp/Common/Inventory/ItemOnGround2D.cs" id="1_tlhp6"]
|
||||
[ext_resource type="Script" uid="uid://c8suoi3i6kqai" path="res://scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith.cs" id="3_xu8me"]
|
||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/intaractable_outline.tres" id="4_harr4"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="4_xu8me"]
|
||||
[ext_resource type="Texture2D" uid="uid://cfxibry711o16" path="res://art/ui/UI/icons/icon-scythe.png" id="5_harr4"]
|
||||
|
||||
@@ -11,13 +12,6 @@ default_font_size = 80
|
||||
[sub_resource type="Theme" id="Theme_harr4"]
|
||||
default_font_size = 40
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_tlhp6"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="Theme" id="Theme_xu8me"]
|
||||
default_font_size = 75
|
||||
|
||||
[node name="GenericItemOnGround" type="Node2D"]
|
||||
script = ExtResource("1_tlhp6")
|
||||
|
||||
@@ -43,25 +37,11 @@ theme = SubResource("Theme_harr4")
|
||||
text = "thewe waf a pwoblem wiph picking up te item UWU"
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="InteractionArea2" parent="." instance=ExtResource("4_xu8me")]
|
||||
|
||||
[node name="CollisionShape3D" parent="InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_tlhp6")
|
||||
|
||||
[node name="Label" parent="InteractionArea2" index="1"]
|
||||
z_index = 5
|
||||
offset_left = -68.0
|
||||
offset_top = -111.0
|
||||
offset_right = 75.0
|
||||
offset_bottom = -3.0
|
||||
theme = SubResource("Theme_xu8me")
|
||||
vertical_alignment = 1
|
||||
[node name="PickupInteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("4_xu8me")]
|
||||
_outlineMaterial = ExtResource("4_harr4")
|
||||
_spriteToOutline = NodePath("../Icon")
|
||||
|
||||
[node name="Icon" type="Sprite2D" parent="."]
|
||||
position = Vector2(5, -300)
|
||||
scale = Vector2(0.868852, 0.868852)
|
||||
texture = ExtResource("5_harr4")
|
||||
|
||||
[connection signal="Interacted" from="InteractionArea2" to="." method="TryPickUp"]
|
||||
|
||||
[editable path="InteractionArea2"]
|
||||
|
||||
@@ -7,12 +7,12 @@ resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="Theme" id="Theme_5ajrf"]
|
||||
default_font_size = 75
|
||||
default_font_size = 30
|
||||
|
||||
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
|
||||
script = ExtResource("1_5ajrf")
|
||||
_area = NodePath("Area2D")
|
||||
_label = NodePath("Label")
|
||||
_label = NodePath("Area2D/CanvasLayer/MarginContainer/Label")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_mask = 4
|
||||
@@ -20,15 +20,32 @@ collision_mask = 4
|
||||
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("CircleShape2D_npluf")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="Area2D"]
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Area2D/CanvasLayer"]
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -88.0
|
||||
offset_top = -100.0
|
||||
offset_right = 3.0
|
||||
offset_bottom = 3.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="Label" type="Label" parent="Area2D/CanvasLayer/MarginContainer"]
|
||||
visible = false
|
||||
offset_left = -46.0
|
||||
offset_top = -55.0
|
||||
offset_right = 45.0
|
||||
offset_bottom = 48.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 8
|
||||
theme = SubResource("Theme_5ajrf")
|
||||
text = "[E]"
|
||||
horizontal_alignment = 1
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 2
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="OnPlayerEntered"]
|
||||
[connection signal="body_exited" from="Area2D" to="." method="OnPlayerExited"]
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
[node name="BabushkaSceneBootstrap" type="Node2D"]
|
||||
|
||||
[node name="BabushkaSceneStartMenu" parent="." instance=ExtResource("1_15ton")]
|
||||
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_disclaimer.tscn")
|
||||
|
||||
[node name="SceneParent" type="Node" parent="."]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=102 format=3 uid="uid://gigb28qk8t12"]
|
||||
[gd_scene load_steps=100 format=3 uid="uid://gigb28qk8t12"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="1_7wfwe"]
|
||||
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
||||
@@ -153,14 +153,6 @@ size = Vector2(1041, 368)
|
||||
resource_local_to_scene = true
|
||||
radius = 371.058
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2nee2"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ipqaa"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lhtpe"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bcdgk"]
|
||||
@@ -1050,30 +1042,18 @@ position = Vector2(6095, 2087)
|
||||
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("26_ipqaa")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_2nee2")
|
||||
|
||||
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||
position = Vector2(8192, 3507)
|
||||
|
||||
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("28_ipqaa")
|
||||
|
||||
[node name="InteractionArea2" parent="YSorted/CanGenericPickup" index="3"]
|
||||
position = Vector2(0, -159)
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="RakeGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||
position = Vector2(8391, 2060)
|
||||
|
||||
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("28_6b2nr")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||
visible = false
|
||||
position = Vector2(15642, 2158)
|
||||
@@ -1081,9 +1061,6 @@ position = Vector2(15642, 2158)
|
||||
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("29_wtdui")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||
visible = false
|
||||
position = Vector2(5454, 2049)
|
||||
@@ -1091,9 +1068,6 @@ position = Vector2(5454, 2049)
|
||||
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("27_ipqaa")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
||||
position = Vector2(-60, 122)
|
||||
|
||||
@@ -1118,6 +1092,8 @@ polygon = PackedVector2Array(247.227, 43.5123, 44.7822, 43.5123, -87.2178, 45.12
|
||||
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" instance=ExtResource("27_klb81")]
|
||||
position = Vector2(5839, 2349)
|
||||
scale = Vector2(2.425, 2.425)
|
||||
_useOutline = false
|
||||
_useSprite = false
|
||||
_id = 0
|
||||
|
||||
[node name="greenery" type="Node2D" parent="YSorted/Farm visuals/Static"]
|
||||
@@ -2191,22 +2167,27 @@ position = Vector2(1269, 3170)
|
||||
|
||||
[node name="trashObject2" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(3183, 2369)
|
||||
offset = Vector2(1, -50)
|
||||
region_rect = Rect2(207, 1184, 149, 142)
|
||||
|
||||
[node name="trashObject3" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(4724, 3519)
|
||||
offset = Vector2(1, -50)
|
||||
region_rect = Rect2(400, 1053, 163, 141)
|
||||
|
||||
[node name="trashObject4" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(5385, 3391)
|
||||
offset = Vector2(1, -50)
|
||||
region_rect = Rect2(1048, 1092, 348, 106)
|
||||
|
||||
[node name="trashObject5" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(8051, 2541)
|
||||
offset = Vector2(1, -50)
|
||||
region_rect = Rect2(531, 1207, 176, 167)
|
||||
|
||||
[node name="trashObject6" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(9629, 3312)
|
||||
offset = Vector2(1, -50)
|
||||
region_rect = Rect2(207, 1184, 149, 142)
|
||||
|
||||
[node name="trashObject7" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
@@ -2218,7 +2199,7 @@ rotation = 1.77025
|
||||
region_rect = Rect2(629, 81, 227, 829)
|
||||
|
||||
[node name="trashObject9" parent="YSorted/trash" instance=ExtResource("53_ycj14")]
|
||||
position = Vector2(15197, 3447)
|
||||
position = Vector2(15322, 3472)
|
||||
rotation = 1.77025
|
||||
region_rect = Rect2(1048, 1092, 348, 106)
|
||||
|
||||
@@ -2305,14 +2286,9 @@ script = ExtResource("40_w3jkj")
|
||||
[editable path="YSorted/Vesna"]
|
||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
||||
[editable path="YSorted/HoeGenericPickup"]
|
||||
[editable path="YSorted/HoeGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/CanGenericPickup"]
|
||||
[editable path="YSorted/CanGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/RakeGenericPickup"]
|
||||
[editable path="YSorted/RakeGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/ScytheGenericPickup"]
|
||||
[editable path="YSorted/ScytheGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/ShovelGenericPickup"]
|
||||
[editable path="YSorted/ShovelGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/trash/trashObject"]
|
||||
[editable path="CanvasLayer"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=100 format=3 uid="uid://cic8y0mdk3vd2"]
|
||||
[gd_scene load_steps=98 format=3 uid="uid://cic8y0mdk3vd2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_gwe0p"]
|
||||
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_1kqg8"]
|
||||
@@ -151,14 +151,6 @@ size = Vector2(1041, 368)
|
||||
resource_local_to_scene = true
|
||||
radius = 371.058
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2nee2"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ipqaa"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lhtpe"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bcdgk"]
|
||||
@@ -1044,30 +1036,18 @@ position = Vector2(6095, 2087)
|
||||
[node name="SpawnWithItem" parent="YSorted/HoeGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("34_n176s")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/HoeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_2nee2")
|
||||
|
||||
[node name="CanGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||
position = Vector2(8192, 3507)
|
||||
|
||||
[node name="SpawnWithItem" parent="YSorted/CanGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("30_te7n5")
|
||||
|
||||
[node name="InteractionArea2" parent="YSorted/CanGenericPickup" index="3"]
|
||||
position = Vector2(0, -159)
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/CanGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="RakeGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||
position = Vector2(8391, 2060)
|
||||
|
||||
[node name="SpawnWithItem" parent="YSorted/RakeGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("29_36k8l")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/RakeGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="ScytheGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||
visible = false
|
||||
position = Vector2(15642, 2158)
|
||||
@@ -1075,9 +1055,6 @@ position = Vector2(15642, 2158)
|
||||
[node name="SpawnWithItem" parent="YSorted/ScytheGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("35_p4sr7")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/ScytheGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="ShovelGenericPickup" parent="YSorted" instance=ExtResource("33_tml8r")]
|
||||
visible = false
|
||||
position = Vector2(5454, 2049)
|
||||
@@ -1085,9 +1062,6 @@ position = Vector2(5454, 2049)
|
||||
[node name="SpawnWithItem" parent="YSorted/ShovelGenericPickup" index="0"]
|
||||
_blueprint = ExtResource("36_vri5g")
|
||||
|
||||
[node name="CollisionShape3D" parent="YSorted/ShovelGenericPickup/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_ipqaa")
|
||||
|
||||
[node name="Farm visuals" type="Node2D" parent="YSorted"]
|
||||
position = Vector2(-60, 122)
|
||||
|
||||
@@ -2259,13 +2233,8 @@ script = ExtResource("59_0knno")
|
||||
[editable path="YSorted/Vesna"]
|
||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
||||
[editable path="YSorted/HoeGenericPickup"]
|
||||
[editable path="YSorted/HoeGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/CanGenericPickup"]
|
||||
[editable path="YSorted/CanGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/RakeGenericPickup"]
|
||||
[editable path="YSorted/RakeGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/ScytheGenericPickup"]
|
||||
[editable path="YSorted/ScytheGenericPickup/InteractionArea2"]
|
||||
[editable path="YSorted/ShovelGenericPickup"]
|
||||
[editable path="YSorted/ShovelGenericPickup/InteractionArea2"]
|
||||
[editable path="CanvasLayer"]
|
||||
|
||||
@@ -525,12 +525,6 @@ _timelinesToPlay = PackedStringArray("yeli_intro_05")
|
||||
position = Vector2(-207.487, 136.185)
|
||||
shape = SubResource("CircleShape2D_wuntg")
|
||||
|
||||
[node name="Label" parent="Yeli/InteractionArea" index="1"]
|
||||
offset_left = -332.62
|
||||
offset_top = -99.8217
|
||||
offset_right = -85.6204
|
||||
offset_bottom = 3.17825
|
||||
|
||||
[node name="AnimatedSprite" parent="Yeli/TalkingControl" index="0"]
|
||||
position = Vector2(-576, 368)
|
||||
|
||||
|
||||
@@ -6,15 +6,25 @@ public partial class InteractionArea2D : Node2D
|
||||
{
|
||||
[Export] private Area2D _area;
|
||||
[Export] private Label _label;
|
||||
[Export] private SpriteSwitcher2D _sprites; // TODO: remove
|
||||
[Export] private bool _useOutline = true;
|
||||
[Export] private ShaderMaterial _outlineMaterial;
|
||||
[Export] private bool _useSprite = true;
|
||||
[Export] private CanvasItem _spriteToOutline;
|
||||
[Export] private bool _showLabel = true;
|
||||
[Export] private int _id = -1; // TODO: remove
|
||||
|
||||
private Material _backupMaterial;
|
||||
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
||||
[Signal] public delegate void InteractedEventHandler();
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if(_useSprite && _useOutline)
|
||||
_backupMaterial = _spriteToOutline.Material;
|
||||
}
|
||||
|
||||
public void OnPlayerEntered(Node2D player)
|
||||
{
|
||||
if (!IsActive)
|
||||
@@ -22,6 +32,11 @@ public partial class InteractionArea2D : Node2D
|
||||
|
||||
if(_showLabel)
|
||||
_label.Show();
|
||||
|
||||
if (!_useSprite || !_useOutline)
|
||||
return;
|
||||
|
||||
_spriteToOutline.Material = _outlineMaterial;
|
||||
}
|
||||
|
||||
public void OnPlayerExited(Node2D player)
|
||||
@@ -30,6 +45,11 @@ public partial class InteractionArea2D : Node2D
|
||||
return;
|
||||
|
||||
_label.Hide();
|
||||
|
||||
if (!_useSprite || !_useOutline)
|
||||
return;
|
||||
|
||||
_spriteToOutline.Material = _backupMaterial;
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
@@ -40,6 +60,10 @@ public partial class InteractionArea2D : Node2D
|
||||
if (@event.IsAction("interact") && @event.IsPressed() && _area.HasOverlappingBodies())
|
||||
{
|
||||
_label.Hide();
|
||||
|
||||
if (_useSprite && _useOutline)
|
||||
_spriteToOutline.Material = _backupMaterial;
|
||||
|
||||
EmitSignal(SignalName.InteractedTool, _id);
|
||||
EmitSignal(SignalName.Interacted);
|
||||
}
|
||||
@@ -47,13 +71,9 @@ public partial class InteractionArea2D : Node2D
|
||||
|
||||
public void SetSpriteActiveState(bool success, int id) // TODO: remove
|
||||
{
|
||||
GD.PrintErr("SetSpriteActiveState is being called.");
|
||||
if(!IsActive)
|
||||
return;
|
||||
|
||||
if (_id == id)
|
||||
{
|
||||
_sprites.SwitchState(!success);
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleActive()
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform bool allow_out_of_bounds = true;
|
||||
uniform float outline_thickness: hint_range(0.0, 16.0, 1.0) = 1.0;
|
||||
uniform vec4 outline_color: source_color = vec4(1.0);
|
||||
|
||||
bool is_inside_usquare(vec2 x) {
|
||||
return x == clamp(x, vec2(0.0), vec2(1.0));
|
||||
}
|
||||
|
||||
vec4 blend(vec4 bottom, vec4 top) {
|
||||
float alpha = top.a + bottom.a * (1.0 - top.a);
|
||||
if (alpha < 0.0001) return vec4(0.0);
|
||||
|
||||
vec3 color = mix(bottom.rgb * bottom.a, top.rgb, top.a) / alpha;
|
||||
return vec4(color, alpha);
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
if (allow_out_of_bounds) VERTEX += (UV * 2.0 - 1.0) * outline_thickness;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
if (outline_thickness > 0.0 && outline_color.a > 0.0) {
|
||||
vec2 uv = UV;
|
||||
vec4 texture_color = texture(TEXTURE, UV);
|
||||
|
||||
if (allow_out_of_bounds) {
|
||||
vec2 texture_pixel_size = vec2(1.0) / (vec2(1.0) / TEXTURE_PIXEL_SIZE + vec2(outline_thickness * 2.0));
|
||||
uv = (uv - texture_pixel_size * outline_thickness) * TEXTURE_PIXEL_SIZE / texture_pixel_size;
|
||||
|
||||
if (is_inside_usquare(uv)) {
|
||||
texture_color = texture(TEXTURE, uv);
|
||||
} else {
|
||||
texture_color = vec4(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
float alpha = 0.0;
|
||||
|
||||
for (float y = 1.0; y <= outline_thickness; y++) {
|
||||
for (float x = 0.0; x <= y; x++) {
|
||||
if (length(vec2(x, y - 0.5)) > outline_thickness) break;
|
||||
|
||||
float look_at_alpha;
|
||||
vec2 look_at_uv[8] = {
|
||||
uv + vec2(x, y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-x, y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(x, -y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-x, -y) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(y, x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-y, x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(y, -x) * TEXTURE_PIXEL_SIZE,
|
||||
uv + vec2(-y, -x) * TEXTURE_PIXEL_SIZE
|
||||
};
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (is_inside_usquare(look_at_uv[i])) {
|
||||
look_at_alpha = texture(TEXTURE, look_at_uv[i]).a;
|
||||
if (look_at_alpha > alpha) alpha = look_at_alpha;
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
|
||||
if (1.0 - alpha < 0.0001) break;
|
||||
}
|
||||
|
||||
COLOR = blend(vec4(outline_color.rgb, alpha * outline_color.a), texture_color);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dsa3lv2as7q3b
|
||||
Reference in New Issue
Block a user