2022-11-25 09:11:46 -08:00
|
|
|
[gd_scene load_steps=16 format=3 uid="uid://d72ehtv1ks0e"]
|
2022-11-18 13:53:51 -08:00
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://Items/Weapons/Sword.cs" id="1_mlo73"]
|
2022-11-25 09:11:46 -08:00
|
|
|
[ext_resource type="Texture2D" uid="uid://dt6u8p4h6g7le" path="res://Assets/Sprites/knife.png" id="2_rnfo4"]
|
2022-11-18 13:53:51 -08:00
|
|
|
[ext_resource type="PackedScene" uid="uid://du5vhccg75nrq" path="res://BoundingBoxes/Hitbox.tscn" id="3_up3ob"]
|
2022-11-19 21:21:12 -08:00
|
|
|
[ext_resource type="PackedScene" uid="uid://cojxmcin13ihm" path="res://Utils/Trail.tscn" id="4_pt6lq"]
|
2022-11-25 09:11:46 -08:00
|
|
|
[ext_resource type="Texture2D" uid="uid://do1bui3bblkk7" path="res://Assets/Sprites/sword-swing.png" id="5_pywek"]
|
2022-11-18 13:53:51 -08:00
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[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)
|
2022-11-18 13:53:51 -08:00
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[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="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,
|
2022-11-25 09:11:46 -08:00
|
|
|
"values": [-1.0472]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
tracks/1/type = "value"
|
|
|
|
tracks/1/imported = false
|
|
|
|
tracks/1/enabled = true
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/1/path = NodePath("SwingSprite:frame")
|
2022-11-19 21:21:12 -08:00
|
|
|
tracks/1/interp = 1
|
|
|
|
tracks/1/loop_wrap = true
|
|
|
|
tracks/1/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
2022-11-25 09:11:46 -08:00
|
|
|
"update": 1,
|
|
|
|
"values": [0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_mv7y2"]
|
|
|
|
resource_name = "idle"
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_orc8t"]
|
|
|
|
resource_name = "use"
|
2022-11-25 11:59:55 -08:00
|
|
|
length = 1.5
|
2022-11-25 09:11:46 -08:00
|
|
|
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
|
2022-11-25 11:59:55 -08:00
|
|
|
tracks/0/loop_wrap = false
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/0/keys = {
|
2022-11-25 11:59:55 -08:00
|
|
|
"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]
|
2022-11-25 09:11:46 -08:00
|
|
|
}
|
|
|
|
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.05, 0.25),
|
|
|
|
"transitions": PackedFloat32Array(1, 1),
|
|
|
|
"values": [{
|
|
|
|
"args": [],
|
|
|
|
"method": &"Attack"
|
|
|
|
}, {
|
|
|
|
"args": [],
|
|
|
|
"method": &"Deattack"
|
|
|
|
}]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
tracks/2/type = "value"
|
|
|
|
tracks/2/imported = false
|
|
|
|
tracks/2/enabled = true
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/2/path = NodePath("SwingSprite:frame")
|
2022-11-19 21:21:12 -08:00
|
|
|
tracks/2/interp = 1
|
|
|
|
tracks/2/loop_wrap = true
|
|
|
|
tracks/2/keys = {
|
2022-11-25 09:11:46 -08:00
|
|
|
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4),
|
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
|
|
|
"update": 1,
|
|
|
|
"values": [0, 1, 2, 0]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[sub_resource type="Animation" id="Animation_y4mj3"]
|
|
|
|
resource_name = "use2"
|
|
|
|
length = 0.75
|
2022-11-19 21:21:12 -08:00
|
|
|
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 = {
|
2022-11-25 11:59:55 -08:00
|
|
|
"times": PackedFloat32Array(0.05, 0.1, 0.2, 0.25, 0.75),
|
2022-11-25 09:11:46 -08:00
|
|
|
"transitions": PackedFloat32Array(1, 4, 1, 2, 1),
|
2022-11-25 11:59:55 -08:00
|
|
|
"update": 3,
|
2022-11-25 09:11:46 -08:00
|
|
|
"values": [3.75246, 4.10152, -0.785398, -0.785398, -0.610865]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/1/type = "method"
|
2022-11-19 21:21:12 -08:00
|
|
|
tracks/1/imported = false
|
|
|
|
tracks/1/enabled = true
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/1/path = NodePath(".")
|
2022-11-19 21:21:12 -08:00
|
|
|
tracks/1/interp = 1
|
|
|
|
tracks/1/loop_wrap = true
|
|
|
|
tracks/1/keys = {
|
2022-11-25 09:11:46 -08:00
|
|
|
"times": PackedFloat32Array(0.05, 0.25),
|
|
|
|
"transitions": PackedFloat32Array(1, 1),
|
|
|
|
"values": [{
|
|
|
|
"args": [],
|
|
|
|
"method": &"Attack"
|
|
|
|
}, {
|
|
|
|
"args": [],
|
|
|
|
"method": &"Deattack"
|
|
|
|
}]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
tracks/2/type = "value"
|
|
|
|
tracks/2/imported = false
|
|
|
|
tracks/2/enabled = true
|
2022-11-25 09:11:46 -08:00
|
|
|
tracks/2/path = NodePath("SwingSprite:frame")
|
2022-11-19 21:21:12 -08:00
|
|
|
tracks/2/interp = 1
|
|
|
|
tracks/2/loop_wrap = true
|
|
|
|
tracks/2/keys = {
|
2022-11-25 09:11:46 -08:00
|
|
|
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4),
|
2022-11-19 21:21:12 -08:00
|
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
2022-11-25 09:11:46 -08:00
|
|
|
"update": 1,
|
|
|
|
"values": [0, 1, 3, 0]
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tao4k"]
|
|
|
|
_data = {
|
|
|
|
"RESET": SubResource("Animation_b7327"),
|
|
|
|
"idle": SubResource("Animation_mv7y2"),
|
2022-11-25 09:11:46 -08:00
|
|
|
"use": SubResource("Animation_orc8t"),
|
|
|
|
"use2": SubResource("Animation_y4mj3")
|
2022-11-19 21:21:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_1lid1"]
|
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_tv0o2"]
|
|
|
|
points = PackedVector2Array(-11.314, -11.314, 0, -16, 11.314, -11.314, 16, 0, 11.314, 11.314, 0, 16, -11.314, 11.314, 0, 0)
|
|
|
|
|
|
|
|
[node name="Sword" type="Node2D" node_paths=PackedStringArray("Hitbox", "AnimationPlayer", "ParryParticles")]
|
2022-11-18 13:53:51 -08:00
|
|
|
texture_filter = 3
|
2022-11-25 11:59:55 -08:00
|
|
|
position = Vector2(2, 0)
|
2022-11-19 21:21:12 -08:00
|
|
|
y_sort_enabled = true
|
2022-11-18 13:53:51 -08:00
|
|
|
script = ExtResource("1_mlo73")
|
2022-11-25 09:11:46 -08:00
|
|
|
Hitbox = NodePath("Hitbox")
|
2022-11-19 21:21:12 -08:00
|
|
|
AnimationPlayer = NodePath("AnimationPlayer")
|
|
|
|
AttackTime = 0.1
|
2022-11-25 09:11:46 -08:00
|
|
|
ParryParticles = NodePath("Anchor/Sprite2D/ParryParticles")
|
|
|
|
Damage = 30.0
|
|
|
|
UseTime = 0.8
|
|
|
|
Knockback = 80.0
|
2022-11-19 21:21:12 -08:00
|
|
|
Description = "A basic sword."
|
|
|
|
|
|
|
|
[node name="Anchor" type="Node2D" parent="."]
|
2022-11-25 09:11:46 -08:00
|
|
|
rotation = -1.0472
|
2022-11-19 21:21:12 -08:00
|
|
|
y_sort_enabled = true
|
2022-11-18 13:53:51 -08:00
|
|
|
|
2022-11-19 21:21:12 -08:00
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="Anchor"]
|
2022-11-25 11:59:55 -08:00
|
|
|
position = Vector2(0, -10)
|
2022-11-19 21:21:12 -08:00
|
|
|
y_sort_enabled = true
|
2022-11-25 09:11:46 -08:00
|
|
|
texture = ExtResource("2_rnfo4")
|
|
|
|
|
|
|
|
[node name="ParryParticles" type="CPUParticles2D" parent="Anchor/Sprite2D"]
|
|
|
|
position = Vector2(-0.221825, -3.12132)
|
|
|
|
rotation = 0.785398
|
|
|
|
emitting = false
|
|
|
|
amount = 12
|
|
|
|
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")
|
2022-11-19 21:21:12 -08:00
|
|
|
|
|
|
|
[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("../Sprite2D")
|
2022-11-18 13:53:51 -08:00
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
2022-11-19 21:21:12 -08:00
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_tao4k")
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="AnimationTree" type="AnimationTree" parent="."]
|
|
|
|
tree_root = SubResource("AnimationNodeAnimation_1lid1")
|
|
|
|
anim_player = NodePath("../AnimationPlayer")
|
|
|
|
active = true
|
2022-11-18 13:53:51 -08:00
|
|
|
|
2022-11-25 09:11:46 -08:00
|
|
|
[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="."]
|
|
|
|
|
|
|
|
[node name="ParrySound" type="AudioStreamPlayer2D" parent="."]
|
|
|
|
|
|
|
|
[connection signal="Hit" from="Hitbox" to="." method="_on_hitbox_hit"]
|
|
|
|
|
|
|
|
[editable path="Hitbox"]
|