fixat mer med traps och arrows och grejjer

This commit is contained in:
2026-01-22 01:03:01 +01:00
parent c0d229ee86
commit eaf86b39fa
20 changed files with 1589 additions and 194 deletions

View File

@@ -5,6 +5,7 @@
[ext_resource type="AudioStream" uid="uid://hmci4kgvbqib" path="res://assets/audio/sfx/weapons/bow/arrow_fire_swosh.wav" id="3_o8cb2"]
[ext_resource type="AudioStream" uid="uid://b140nlsak4ub7" path="res://assets/audio/sfx/weapons/bow/arrow-hit-brick-wall-01.mp3" id="4_8l43l"]
[ext_resource type="AudioStream" uid="uid://dc7nt8gnjt5u5" path="res://assets/audio/sfx/weapons/melee_attack_12.wav.mp3" id="4_ol4b0"]
[ext_resource type="AudioStream" uid="uid://d4kjyb1olr74s" path="res://assets/audio/sfx/weapons/bow/bow_draw-02.mp3" id="6_e0wjs"]
[sub_resource type="Gradient" id="Gradient_yp18a"]
colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 0)
@@ -56,21 +57,44 @@ debug_color = Color(0.7, 0, 0.195726, 0.42)
[node name="SfxArrowFire" type="AudioStreamPlayer2D" parent="." unique_id=1413495156]
stream = ExtResource("3_o8cb2")
pitch_scale = 1.61
attenuation = 7.464256
max_polyphony = 4
panning_strength = 1.01
bus = &"Sfx"
[node name="SfxImpactWall" type="AudioStreamPlayer2D" parent="." unique_id=1132726967]
stream = ExtResource("4_8l43l")
volume_db = -4.0
pitch_scale = 1.29
attenuation = 3.4822
attenuation = 3.9999971
max_polyphony = 4
panning_strength = 1.3
bus = &"Sfx"
[node name="SfxImpactSound" type="AudioStreamPlayer2D" parent="." unique_id=463883211]
stream = ExtResource("4_ol4b0")
volume_db = -4.685
pitch_scale = 1.47
attenuation = 8.574182
max_polyphony = 4
panning_strength = 1.03
bus = &"Sfx"
[node name="SfxPickup" type="AudioStreamPlayer2D" parent="." unique_id=916101887]
stream = ExtResource("6_e0wjs")
volume_db = -2.204
pitch_scale = 1.79
attenuation = 6.498014
panning_strength = 1.06
bus = &"Sfx"
[node name="SfxLandsOnGround" type="AudioStreamPlayer2D" parent="." unique_id=1827010383]
stream = ExtResource("6_e0wjs")
volume_db = -2.645
pitch_scale = 1.65
attenuation = 5.6568513
panning_strength = 1.08
bus = &"Sfx"
[connection signal="area_entered" from="ArrowArea" to="." method="_on_arrow_area_area_entered"]
[connection signal="body_entered" from="ArrowArea" to="." method="_on_arrow_area_body_entered"]

View File

@@ -31,6 +31,10 @@
[ext_resource type="AudioStream" uid="uid://w6yon88kjfml" path="res://assets/audio/sfx/nickes/lift_sfx.ogg" id="28_pf23h"]
[ext_resource type="AudioStream" uid="uid://d4kjyb1olr74s" path="res://assets/audio/sfx/weapons/bow/bow_draw-02.mp3" id="30_gl8cc"]
[ext_resource type="AudioStream" uid="uid://mbtpqlb5n3gd" path="res://assets/audio/sfx/weapons/bow/bow_no_arrow.mp3" id="31_487ah"]
[ext_resource type="AudioStream" uid="uid://fm6hrpckfknc" path="res://assets/audio/sfx/player/unlock/padlock_wiggle_03.wav" id="32_bj30b"]
[ext_resource type="AudioStream" uid="uid://be3uspidyqm3x" path="res://assets/audio/sfx/player/unlock/padlock_wiggle_04.wav" id="33_jc3p3"]
[ext_resource type="AudioStream" uid="uid://dvttykynr671m" path="res://assets/audio/sfx/player/unlock/padlock_wiggle_05.wav" id="34_hax0n"]
[ext_resource type="AudioStream" uid="uid://sejnuklu653m" path="res://assets/audio/sfx/player/unlock/padlock_wiggle_06.wav" id="35_t4otl"]
[sub_resource type="Gradient" id="Gradient_wqfne"]
colors = PackedColorArray(0, 0, 0, 1, 1, 0.13732082, 0.092538536, 1)
@@ -280,6 +284,14 @@ random_pitch = 1.0630184
streams_count = 1
stream_0/stream = ExtResource("31_487ah")
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_j2b1d"]
random_pitch = 1.1036249
streams_count = 4
stream_0/stream = ExtResource("32_bj30b")
stream_1/stream = ExtResource("33_jc3p3")
stream_2/stream = ExtResource("34_hax0n")
stream_3/stream = ExtResource("35_t4otl")
[node name="Player" type="CharacterBody2D" unique_id=937429705]
collision_mask = 67
motion_mode = 1

133
src/scenes/trap.tscn Normal file
View File

@@ -0,0 +1,133 @@
[gd_scene format=3 uid="uid://bcgdkojealqoo"]
[ext_resource type="Script" uid="uid://bkp8t4mvdhtqq" path="res://scripts/trap.gd" id="1_62q8x"]
[ext_resource type="Texture2D" uid="uid://b6eeio3gm7d4u" path="res://assets/gfx/traps/Floor_Lance.png" id="2_aucmg"]
[ext_resource type="AudioStream" uid="uid://raqmpvp1vj04" path="res://assets/audio/sfx/traps/activate.mp3" id="3_tk2q1"]
[ext_resource type="AudioStream" uid="uid://dxy2phfh0ojot" path="res://assets/audio/sfx/player/dodge/Dodge.mp3" id="4_1sb0t"]
[sub_resource type="Animation" id="Animation_tk2q1"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_1sb0t"]
resource_name = "activate"
length = 1.4333333
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.033333335, 0.06666667, 0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
[sub_resource type="Animation" id="Animation_62q8x"]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_aucmg"]
resource_name = "reset"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.033333335, 0.06666667, 0.1),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [3, 2, 1, 0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7s8xa"]
_data = {
&"RESET": SubResource("Animation_tk2q1"),
&"activate": SubResource("Animation_1sb0t"),
&"idle": SubResource("Animation_62q8x"),
&"reset": SubResource("Animation_aucmg")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_62q8x"]
size = Vector2(16, 16)
[sub_resource type="CircleShape2D" id="CircleShape2D_aucmg"]
radius = 17.117243
[sub_resource type="CircleShape2D" id="CircleShape2D_62q8x"]
radius = 99.0202
[node name="Trap" type="Node2D" unique_id=131165873]
script = ExtResource("1_62q8x")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1625881554]
texture = ExtResource("2_aucmg")
hframes = 4
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1394959342]
libraries/ = SubResource("AnimationLibrary_7s8xa")
[node name="ActivationArea" type="Area2D" parent="." unique_id=694690572]
collision_layer = 4096
[node name="CollisionShape2D" type="CollisionShape2D" parent="ActivationArea" unique_id=1574459451]
shape = SubResource("RectangleShape2D_62q8x")
[node name="DisarmArea" type="Area2D" parent="." unique_id=687041294]
collision_layer = 4096
[node name="CollisionShape2D" type="CollisionShape2D" parent="DisarmArea" unique_id=1192467236]
shape = SubResource("CircleShape2D_aucmg")
debug_color = Color(0.70196074, 0.614594, 0.08530171, 0.41960785)
[node name="DetectionArea" type="Area2D" parent="." unique_id=1872122085]
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea" unique_id=1024222789]
shape = SubResource("CircleShape2D_62q8x")
debug_color = Color(0.53960574, 0.04878081, 0.70196074, 0.41960785)
[node name="SfxActivate" type="AudioStreamPlayer2D" parent="." unique_id=312292112]
stream = ExtResource("3_tk2q1")
volume_db = -1.559
attenuation = 4.438279
panning_strength = 1.03
bus = &"Sfx"
[node name="SfxAvoid" type="AudioStreamPlayer2D" parent="." unique_id=322639992]
stream = ExtResource("4_1sb0t")
pitch_scale = 1.35
attenuation = 1.9318731
bus = &"Sfx"
[node name="SfxDisarming" type="AudioStreamPlayer2D" parent="." unique_id=920322213]
bus = &"Sfx"
[connection signal="body_shape_entered" from="ActivationArea" to="." method="_on_activation_area_body_shape_entered"]