SupaLidlGame/Items/Weapons/Sword.tscn

450 lines
13 KiB
Plaintext
Raw Permalink Normal View History

2023-12-31 05:59:33 -08:00
[gd_scene load_steps=26 format=3 uid="uid://dvqap2uhcah63"]
2022-11-18 13:53:51 -08:00
[ext_resource type="Script" path="res://Items/Weapons/Sword.cs" id="1_mlo73"]
2023-12-31 05:59:33 -08:00
[ext_resource type="Resource" uid="uid://cl7jvdu2lnv2d" path="res://Items/Weapons/Sword.tres" id="2_atd4f"]
2023-05-26 17:42:50 -07:00
[ext_resource type="Script" path="res://State/Weapon/WeaponStateMachine.cs" id="2_vwirq"]
[ext_resource type="Script" path="res://State/Weapon/SwordIdleState.cs" id="3_nw6r0"]
2023-05-23 00:23:53 -07:00
[ext_resource type="Texture2D" uid="uid://dp7osg05ip5oo" path="res://Assets/Sprites/sword.png" id="3_r75ni"]
2022-11-18 13:53:51 -08:00
[ext_resource type="PackedScene" uid="uid://du5vhccg75nrq" path="res://BoundingBoxes/Hitbox.tscn" id="3_up3ob"]
2023-05-26 17:42:50 -07:00
[ext_resource type="Script" path="res://State/Weapon/SwordAnticipateState.cs" id="4_j3cud"]
2022-11-19 21:21:12 -08:00
[ext_resource type="PackedScene" uid="uid://cojxmcin13ihm" path="res://Utils/Trail.tscn" id="4_pt6lq"]
2023-05-26 17:42:50 -07:00
[ext_resource type="Script" path="res://State/Weapon/SwordAttackState.cs" id="5_hmisb"]
2022-11-26 14:53:24 -08:00
[ext_resource type="AudioStream" uid="uid://c4n7ioxpukdwi" path="res://Assets/Sounds/parry.wav" id="6_8nxjm"]
2023-07-23 23:39:20 -07:00
[ext_resource type="Material" uid="uid://cbfaqolx1ydvv" path="res://Assets/Sprites/Particles/ParryParticles.tres" id="8_10gir"]
[ext_resource type="Texture2D" uid="uid://d75jkoev5v3w" path="res://Assets/Sprites/Particles/circle-64.png" id="9_o34ry"]
2023-07-23 11:03:55 -07:00
[ext_resource type="Shape2D" uid="uid://dw4e4r2yxwk1b" path="res://Items/Weapons/SwordCollisionShape.tres" id="9_wsprl"]
2023-07-22 20:23:48 -07:00
[ext_resource type="Texture2D" uid="uid://cmvh6pc71ir1m" path="res://Assets/Sprites/sword-swing-large.png" id="10_672jv"]
[ext_resource type="AudioStream" uid="uid://qvthq6tppp63" path="res://Assets/Sounds/whoosh.wav" id="10_mfnl7"]
2022-11-18 13:53:51 -08:00
2023-05-23 00:23:53 -07:00
[sub_resource type="Environment" id="Environment_72txp"]
background_mode = 3
glow_enabled = true
glow_hdr_threshold = 1.42
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),
2023-05-23 00:23:53 -07:00
"update": 1,
"values": [-1.5708]
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]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
2023-05-23 00:23:53 -07:00
tracks/2/path = NodePath("Anchor:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
2023-05-23 00:23:53 -07:00
"values": [Vector2(0, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Anchor/Node2D:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.0001, 0.0002),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0.0, 0.0, 0.0]
}
2023-09-10 12:30:26 -07:00
tracks/4/type = "value"
2023-05-23 00:23:53 -07:00
tracks/4/imported = false
tracks/4/enabled = true
2023-09-10 12:30:26 -07:00
tracks/4/path = NodePath("SwingSprite:modulate")
2023-05-23 00:23:53 -07:00
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
2023-07-21 02:54:13 -07:00
"update": 0,
"values": [Color(2, 2, 2, 1)]
}
2023-12-13 18:25:20 -08:00
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Anchor/Node2D/Sprite2D:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("SwingSprite:position")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
2023-05-23 00:23:53 -07:00
[sub_resource type="Animation" id="Animation_ameas"]
resource_name = "anticipate"
length = 0.1
2022-11-25 09:11:46 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
2023-05-23 00:23:53 -07:00
tracks/0/loop_wrap = true
2022-11-25 09:11:46 -08:00
tracks/0/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(0.933033),
2022-11-25 09:11:46 -08:00
"update": 1,
2023-05-23 00:23:53 -07:00
"values": [-2.35619]
2022-11-19 21:21:12 -08:00
}
2023-12-13 18:25:20 -08:00
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Anchor/Node2D/Sprite2D:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
2022-11-19 21:21:12 -08:00
2023-05-23 00:23:53 -07:00
[sub_resource type="Animation" id="Animation_bj2ky"]
resource_name = "anticipate_alternate"
length = 0.1
2022-11-19 21:21:12 -08:00
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
2023-05-23 00:23:53 -07:00
tracks/0/loop_wrap = true
2022-11-19 21:21:12 -08:00
tracks/0/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2.35619]
2022-11-19 21:21:12 -08:00
}
2023-05-23 00:23:53 -07:00
tracks/1/type = "value"
2022-11-19 21:21:12 -08:00
tracks/1/imported = false
tracks/1/enabled = true
2023-05-23 00:23:53 -07:00
tracks/1/path = NodePath("Anchor/Node2D:rotation")
2022-11-19 21:21:12 -08:00
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [3.14159]
2022-11-19 21:21:12 -08:00
}
2023-05-23 00:23:53 -07:00
[sub_resource type="Animation" id="Animation_b8r8j"]
resource_name = "anticipate_bot"
[sub_resource type="Animation" id="Animation_6jphj"]
resource_name = "attack"
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-27 19:37:16 -08:00
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.35),
2023-05-23 00:23:53 -07:00
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [-1.5708, 1.5708, 1.5708]
}
2023-05-23 00:23:53 -07:00
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
2023-05-23 00:23:53 -07:00
tracks/1/path = NodePath("SwingSprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
2023-07-22 20:23:48 -07:00
"times": PackedFloat32Array(0.1, 0.3, 0.35),
2023-05-23 00:23:53 -07:00
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [1, 2, 0]
}
tracks/2/type = "value"
tracks/2/imported = false
2023-05-23 00:23:53 -07:00
tracks/2/enabled = false
tracks/2/path = NodePath("Anchor:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0, 0.1, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [Vector2(0, 0), Vector2(0, -4), Vector2(0, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Anchor/Node2D:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [2.35619]
2023-05-23 00:23:53 -07:00
}
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = true
2023-09-10 12:30:26 -07:00
tracks/4/path = NodePath("SwingSound")
2023-05-23 00:23:53 -07:00
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
2023-07-22 20:23:48 -07:00
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [0.0],
"method": &"play"
}]
}
2023-12-13 18:25:20 -08:00
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Anchor/Node2D/Sprite2D:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.1, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
2023-12-13 18:25:20 -08:00
"update": 1,
"values": [false, true, false]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("SwingSprite:modulate")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.2, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(2, 2, 2, 1), Color(2, 2, 2, 1), Color(2, 2, 2, 0)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("SwingSprite:position")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0, 0.2, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 0), Vector2(2, 0)]
2023-12-13 18:25:20 -08:00
}
2023-05-23 00:23:53 -07:00
[sub_resource type="Animation" id="Animation_pclfs"]
resource_name = "attack_alternate"
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 = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0, 0.15, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [1.5708, -1.5708, -1.5708]
}
2023-05-23 00:23:53 -07:00
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
2023-05-23 00:23:53 -07:00
tracks/1/path = NodePath("SwingSprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
2023-07-22 20:23:48 -07:00
"times": PackedFloat32Array(0.1, 0.3, 0.35),
2023-05-23 00:23:53 -07:00
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
2023-07-22 20:23:48 -07:00
"values": [3, 4, 0]
}
tracks/2/type = "value"
tracks/2/imported = false
2023-05-23 00:23:53 -07:00
tracks/2/enabled = false
tracks/2/path = NodePath("Anchor:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
2023-05-23 00:23:53 -07:00
"times": PackedFloat32Array(0, 0.1, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
2023-05-23 00:23:53 -07:00
"values": [Vector2(0, 0), Vector2(0, -4), Vector2(0, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Anchor/Node2D:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [3.14159, 0.785398]
}
2022-11-19 21:21:12 -08:00
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tao4k"]
_data = {
"RESET": SubResource("Animation_b7327"),
2023-05-23 00:23:53 -07:00
"anticipate": SubResource("Animation_ameas"),
"anticipate_alternate": SubResource("Animation_bj2ky"),
"anticipate_bot": SubResource("Animation_b8r8j"),
"attack": SubResource("Animation_6jphj"),
"attack_alternate": SubResource("Animation_pclfs")
2022-11-19 21:21:12 -08:00
}
2023-09-03 17:42:32 -07:00
[node name="Sword" type="Node2D" node_paths=PackedStringArray("Hitbox", "AnimationPlayer", "ParryParticles", "StateMachine", "Anchor", "HandAnchor")]
2022-12-04 20:12:34 -08:00
y_sort_enabled = true
2022-11-18 13:53:51 -08:00
texture_filter = 3
script = ExtResource("1_mlo73")
2023-09-03 17:42:32 -07:00
Hitbox = NodePath("Hitbox")
AnimationPlayer = NodePath("AnimationPlayer")
2023-05-23 00:23:53 -07:00
AttackTime = 0.2
2023-07-13 23:46:58 -07:00
AttackAnimationDuration = 0.75
2023-09-03 17:42:32 -07:00
ParryParticles = NodePath("Anchor/Node2D/Sprite2D/ParryParticles")
2023-05-26 22:28:08 -07:00
NPCAnticipateTime = 0.3
2023-09-03 17:42:32 -07:00
StateMachine = NodePath("State")
Anchor = NodePath("Anchor")
2022-12-04 20:12:34 -08:00
Damage = 20.0
2023-07-13 23:46:58 -07:00
UseTime = 0.55
2023-05-25 15:28:52 -07:00
Knockback = 64.0
2023-05-28 10:57:23 -07:00
ShouldHideIdle = true
2023-09-03 17:42:32 -07:00
PlayerLevelGain = 1.0
HandAnchor = NodePath("Anchor/Node2D/Sprite2D/Hand")
2023-12-31 05:59:33 -08:00
Metadata = ExtResource("2_atd4f")
2023-05-23 00:23:53 -07:00
2023-09-03 17:42:32 -07:00
[node name="State" type="Node" parent="." node_paths=PackedStringArray("InitialState")]
2023-05-26 17:42:50 -07:00
script = ExtResource("2_vwirq")
2023-09-03 17:42:32 -07:00
InitialState = NodePath("Idle")
2023-08-10 23:08:41 -07:00
UsedItemStates = Array[NodePath]([NodePath("Attack")])
DeusedItemStates = Array[NodePath]([NodePath("Idle")])
2023-05-23 00:23:53 -07:00
2023-09-03 17:42:32 -07:00
[node name="Idle" type="Node" parent="State" node_paths=PackedStringArray("UseState", "Sword")]
2023-05-26 17:42:50 -07:00
script = ExtResource("3_nw6r0")
2023-09-03 17:42:32 -07:00
UseState = NodePath("../Anticipate")
Sword = NodePath("../..")
2023-05-23 00:23:53 -07:00
2023-09-03 17:42:32 -07:00
[node name="Anticipate" type="Node" parent="State" node_paths=PackedStringArray("Sword", "AttackState")]
2023-05-26 17:42:50 -07:00
script = ExtResource("4_j3cud")
2023-09-03 17:42:32 -07:00
Sword = NodePath("../..")
AttackState = NodePath("../Attack")
2023-05-23 00:23:53 -07:00
2023-09-03 17:42:32 -07:00
[node name="Attack" type="Node" parent="State" node_paths=PackedStringArray("Sword", "IdleState")]
2023-05-26 17:42:50 -07:00
script = ExtResource("5_hmisb")
2023-09-03 17:42:32 -07:00
Sword = NodePath("../..")
IdleState = NodePath("../Idle")
2023-05-23 00:23:53 -07:00
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_72txp")
2022-11-19 21:21:12 -08:00
[node name="Anchor" type="Node2D" parent="."]
y_sort_enabled = true
2023-05-23 00:23:53 -07:00
rotation = -1.5708
2022-11-18 13:53:51 -08:00
[node name="Trail" parent="Anchor" instance=ExtResource("4_pt6lq")]
2023-04-23 21:10:37 -07:00
position = Vector2(2.40734, -0.55655)
rotation = 0.945464
width_curve = SubResource("Curve_4cxtp")
gradient = SubResource("Gradient_2ablm")
[node name="Node2D" type="Node2D" parent="Anchor"]
2023-05-25 23:33:21 -07:00
y_sort_enabled = true
2023-05-23 00:23:53 -07:00
position = Vector2(8, 0)
2023-04-23 21:10:37 -07:00
[node name="Sprite2D" type="Sprite2D" parent="Anchor/Node2D"]
2022-11-19 21:21:12 -08:00
y_sort_enabled = true
2023-05-23 00:23:53 -07:00
position = Vector2(0, -8)
texture = ExtResource("3_r75ni")
2022-11-25 09:11:46 -08:00
[node name="Hand" type="Sprite2D" parent="Anchor/Node2D/Sprite2D"]
position = Vector2(-2.52724e-05, 7)
rotation = 1.5708
2023-07-23 23:39:20 -07:00
[node name="ParryParticles" type="GPUParticles2D" parent="Anchor/Node2D/Sprite2D"]
2023-12-31 05:59:33 -08:00
modulate = Color(4, 4, 4, 1)
position = Vector2(0, -3)
2022-11-25 09:11:46 -08:00
rotation = 0.785398
emitting = false
2023-07-23 23:39:20 -07:00
amount = 16
process_material = ExtResource("8_10gir")
texture = ExtResource("9_o34ry")
2023-07-23 23:39:20 -07:00
lifetime = 2.0
2022-11-25 09:11:46 -08:00
one_shot = true
explosiveness = 1.0
fixed_fps = 16
2023-07-22 20:23:48 -07:00
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")
}
2022-11-25 09:11:46 -08:00
[node name="Hitbox" parent="." instance=ExtResource("3_up3ob")]
2023-12-13 18:25:20 -08:00
priority = 5
2022-11-25 09:11:46 -08:00
IsDisabled = true
[node name="CollisionShape2D" parent="Hitbox" index="0"]
2023-05-23 00:23:53 -07:00
position = Vector2(4, 0)
rotation = 1.5708
2023-07-23 11:03:55 -07:00
shape = ExtResource("9_wsprl")
2022-11-25 09:11:46 -08:00
disabled = true
[node name="SwingSprite" type="Sprite2D" parent="."]
2023-05-23 00:23:53 -07:00
modulate = Color(2, 2, 2, 1)
2023-07-22 20:23:48 -07:00
texture = ExtResource("10_672jv")
2023-05-25 23:33:21 -07:00
offset = Vector2(8, 0)
2023-07-22 20:23:48 -07:00
hframes = 5
2022-11-25 09:11:46 -08:00
[node name="SwingSound" type="AudioStreamPlayer2D" parent="."]
2023-07-22 20:23:48 -07:00
stream = ExtResource("10_mfnl7")
2022-11-25 09:11:46 -08:00
[node name="ParrySound" type="AudioStreamPlayer2D" parent="."]
2022-11-26 14:53:24 -08:00
stream = ExtResource("6_8nxjm")
2022-11-25 09:11:46 -08:00
[editable path="Hitbox"]