SupaLidlGame/Items/Weapons/Sword.tscn

376 lines
10 KiB
Plaintext

[gd_scene load_steps=20 format=3 uid="uid://d72ehtv1ks0e"]
[ext_resource type="Script" path="res://Items/Weapons/Sword.cs" id="1_mlo73"]
[ext_resource type="Texture2D" uid="uid://dt6u8p4h6g7le" path="res://Assets/Sprites/knife.png" id="2_rnfo4"]
[ext_resource type="PackedScene" uid="uid://du5vhccg75nrq" path="res://BoundingBoxes/Hitbox.tscn" id="3_up3ob"]
[ext_resource type="PackedScene" uid="uid://cojxmcin13ihm" path="res://Utils/Trail.tscn" id="4_pt6lq"]
[ext_resource type="Texture2D" uid="uid://do1bui3bblkk7" path="res://Assets/Sprites/sword-swing.png" id="5_pywek"]
[ext_resource type="AudioStream" uid="uid://c4n7ioxpukdwi" path="res://Assets/Sounds/parry.wav" id="6_8nxjm"]
[sub_resource type="Curve" id="Curve_4cxtp"]
_data = [Vector2(0.00687286, 1), 0.0, 0.0, 0, 0, Vector2(0.879725, 0.190909), -2.93145, -2.93145, 0, 0, Vector2(1, 0.0454545), 0.0483926, 0.0, 0, 0]
point_count = 3
[sub_resource type="Gradient" id="Gradient_2ablm"]
offsets = PackedFloat32Array(0.835938, 0.992188)
colors = PackedColorArray(1, 1, 1, 0.498039, 1, 1, 1, 0)
[sub_resource type="Gradient" id="Gradient_jjxq2"]
offsets = PackedFloat32Array(0, 0.945312)
colors = PackedColorArray(1, 1, 1, 1, 0.687215, 0.687215, 0.687215, 0)
[sub_resource type="Animation" id="Animation_b7327"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [-0.610865]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("SwingSprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_r58x0"]
resource_name = "attack"
length = 1.5
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0.05, 0.1, 0.2, 0.25, 0.75, 1.5),
"transitions": PackedFloat32Array(1, 4, 1, 2, 4, 1),
"update": 3,
"values": [-0.610865, -0.959931, 3.92699, 3.92699, 3.75246, -0.785398]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1, 0.25),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"Attack"
}, {
"args": [],
"method": &"Deattack"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("SwingSprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 0]
}
[sub_resource type="Animation" id="Animation_mv7y2"]
resource_name = "idle"
[sub_resource type="Animation" id="Animation_orc8t"]
resource_name = "use"
length = 1.5
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0.05, 0.1, 0.2, 0.25, 0.75, 1.5),
"transitions": PackedFloat32Array(1, 4, 1, 2, 4, 1),
"update": 3,
"values": [-0.610865, -0.959931, 3.92699, 3.92699, 3.75246, -0.785398]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1, 0.25),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"Attack"
}, {
"args": [],
"method": &"Deattack"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("SwingSprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 0]
}
[sub_resource type="Animation" id="Animation_nivo8"]
resource_name = "use-npc"
length = 1.5
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0.05, 0.3, 0.4, 0.45, 0.75, 1.5),
"transitions": PackedFloat32Array(1, 4, 1, 2, 4, 1),
"update": 3,
"values": [-0.610865, -1.309, 3.92699, 3.92699, 3.75246, -0.785398]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.3, 0.45),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"Attack"
}, {
"args": [],
"method": &"Deattack"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("SwingSprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.4, 0.5, 0.6),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 0]
}
[sub_resource type="Animation" id="Animation_y4mj3"]
resource_name = "use2"
length = 0.75
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.05, 0.1, 0.2, 0.25, 0.75),
"transitions": PackedFloat32Array(1, 4, 1, 2, 1),
"update": 3,
"values": [3.75246, 4.10152, -0.785398, -0.785398, -0.610865]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.1, 0.25),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"Attack"
}, {
"args": [],
"method": &"Deattack"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("SwingSprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 3, 0]
}
[sub_resource type="Animation" id="Animation_2k2er"]
resource_name = "use2-npc"
length = 0.75
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.05, 0.3, 0.4, 0.45, 0.75),
"transitions": PackedFloat32Array(1, 4, 1, 2, 1),
"update": 3,
"values": [3.75246, 4.45059, -0.785398, -0.785398, -0.610865]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.3, 0.45),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"Attack"
}, {
"args": [],
"method": &"Deattack"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("SwingSprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.4, 0.5, 0.6),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 3, 0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tao4k"]
_data = {
"RESET": SubResource("Animation_b7327"),
"attack": SubResource("Animation_r58x0"),
"idle": SubResource("Animation_mv7y2"),
"use": SubResource("Animation_orc8t"),
"use-npc": SubResource("Animation_nivo8"),
"use2": SubResource("Animation_y4mj3"),
"use2-npc": SubResource("Animation_2k2er")
}
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_1lid1"]
[sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_tv0o2"]
points = PackedVector2Array(-14.142, -14.142, 0, -20, 14.142, -14.142, 20, 0, 14.142, 14.142, 0, 20, -14.142, 14.142, 0, 0)
[node name="Sword" type="Node2D" node_paths=PackedStringArray("Hitbox", "AnimationPlayer", "ParryParticles")]
y_sort_enabled = true
texture_filter = 3
script = ExtResource("1_mlo73")
Hitbox = NodePath("Hitbox")
AnimationPlayer = NodePath("AnimationPlayer")
ParryParticles = NodePath("Anchor/Node2D/Sprite2D/ParryParticles")
Damage = 20.0
UseTime = 0.5
Knockback = 20.0
[node name="Anchor" type="Node2D" parent="."]
y_sort_enabled = true
rotation = -0.610865
[node name="Trail" parent="Anchor" node_paths=PackedStringArray("Tracking") instance=ExtResource("4_pt6lq")]
position = Vector2(2.40734, -0.55655)
rotation = 0.945464
width_curve = SubResource("Curve_4cxtp")
gradient = SubResource("Gradient_2ablm")
Tracking = NodePath("../Node2D/Sprite2D")
[node name="Node2D" type="Node2D" parent="Anchor"]
rotation = -0.846485
[node name="Sprite2D" type="Sprite2D" parent="Anchor/Node2D"]
y_sort_enabled = true
position = Vector2(0, -12)
texture = ExtResource("2_rnfo4")
[node name="ParryParticles" type="CPUParticles2D" parent="Anchor/Node2D/Sprite2D"]
position = Vector2(-0.221825, -3.12132)
rotation = 0.785398
emitting = false
amount = 24
lifetime = 0.4
one_shot = true
explosiveness = 1.0
emission_shape = 1
emission_sphere_radius = 4.0
direction = Vector2(0, -1)
spread = 180.0
gravity = Vector2(0, 200)
initial_velocity_min = 8.0
initial_velocity_max = 64.0
color_ramp = SubResource("Gradient_jjxq2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_tao4k")
}
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource("AnimationNodeAnimation_1lid1")
anim_player = NodePath("../AnimationPlayer")
active = true
[node name="Hitbox" parent="." instance=ExtResource("3_up3ob")]
IsDisabled = true
[node name="CollisionShape2D" parent="Hitbox" index="0"]
shape = SubResource("ConvexPolygonShape2D_tv0o2")
disabled = true
[node name="SwingSprite" type="Sprite2D" parent="."]
texture = ExtResource("5_pywek")
hframes = 4
[node name="SwingSound" type="AudioStreamPlayer2D" parent="."]
max_distance = 256.0
[node name="ParrySound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_8nxjm")
max_distance = 256.0
[connection signal="Hit" from="Hitbox" to="." method="_on_hitbox_hit"]
[editable path="Hitbox"]