SupaLidlGame/Items/Weapons/Bow.tscn

407 lines
12 KiB
Plaintext
Raw Normal View History

2024-08-24 20:23:17 -07:00
[gd_scene load_steps=29 format=3 uid="uid://cgg0sfm2qeiwn"]
2023-09-10 17:08:14 -07:00
[ext_resource type="Texture2D" uid="uid://dam6aigkw8xs" path="res://Assets/Sprites/Items/bow-and-arrow.png" id="1_1ghvv"]
2024-06-24 16:08:53 -07:00
[ext_resource type="Script" path="res://Items/Weapons/Bow.cs" id="1_ikgu2"]
2023-09-10 17:08:14 -07:00
[ext_resource type="PackedScene" uid="uid://cjiftn2suskla" path="res://Entities/Arrow.tscn" id="2_mvw0j"]
[ext_resource type="Script" path="res://State/Weapon/WeaponStateMachine.cs" id="3_pg4gy"]
[ext_resource type="Script" path="res://State/Weapon/RangedIdleState.cs" id="3_uxif8"]
[ext_resource type="Script" path="res://State/Weapon/RangedFireState.cs" id="4_moo4d"]
[ext_resource type="Script" path="res://State/Weapon/RangedChargeState.cs" id="5_k8y6f"]
2024-07-06 22:49:17 -07:00
[ext_resource type="Script" path="res://State/Weapon/BowAltState.cs" id="7_l73rl"]
2023-09-10 17:08:14 -07:00
[ext_resource type="AudioStream" uid="uid://bkekgj4gu7fw4" path="res://Assets/Sounds/bow-draw.wav" id="7_t07v0"]
2024-06-24 16:08:53 -07:00
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="9_tk6lc"]
2023-09-10 17:08:14 -07:00
[ext_resource type="AudioStream" uid="uid://cwy4giq8eod5g" path="res://Assets/Sounds/bow-release.wav" id="9_v051g"]
2024-06-24 16:08:53 -07:00
[ext_resource type="Texture2D" uid="uid://dj1vsctgh1scr" path="res://Assets/Sprites/Misc/flame.png" id="9_xwcvy"]
2024-08-24 20:23:17 -07:00
[ext_resource type="AudioStream" uid="uid://braj74by0oowo" path="res://Assets/Sounds/fire-burst-flash.wav" id="11_65ega"]
2024-06-24 16:08:53 -07:00
[sub_resource type="AtlasTexture" id="AtlasTexture_5af70"]
atlas = ExtResource("9_xwcvy")
region = Rect2(0, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_bct7o"]
atlas = ExtResource("9_xwcvy")
region = Rect2(8, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_fhtjn"]
atlas = ExtResource("9_xwcvy")
region = Rect2(16, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_si88l"]
atlas = ExtResource("9_xwcvy")
region = Rect2(24, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_ap5vw"]
atlas = ExtResource("9_xwcvy")
region = Rect2(32, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_uad0p"]
atlas = ExtResource("9_xwcvy")
region = Rect2(40, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_cxv2f"]
atlas = ExtResource("9_xwcvy")
region = Rect2(48, 0, 8, 8)
[sub_resource type="SpriteFrames" id="SpriteFrames_b2khh"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5af70")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bct7o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fhtjn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_si88l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ap5vw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uad0p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cxv2f")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
2023-09-10 17:08:14 -07:00
[sub_resource type="Animation" id="Animation_h0fti"]
resource_name = "RESET"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor/Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
2024-06-24 16:08:53 -07:00
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Anchor/Flame:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(15, -4)]
2024-06-24 16:08:53 -07:00
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Anchor/Flame:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
2023-09-10 17:08:14 -07:00
2024-07-06 22:49:17 -07:00
[sub_resource type="Animation" id="Animation_bejvb"]
resource_name = "alt_fire"
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor/Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 5, 0, 5, 0, 5, 0, 5, 0]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer2D")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}, {
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}, {
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}, {
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}, {
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}],
"times": PackedFloat32Array(0, 0.1998, 0.3996, 0.5994, 0.7992)
}
tracks/1/use_blend = true
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Anchor/Flame:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(15, -4)]
2024-07-06 22:49:17 -07:00
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Anchor/Flame:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
2023-09-10 17:08:14 -07:00
[sub_resource type="Animation" id="Animation_8qr8x"]
resource_name = "charge"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor/Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.9),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 6, 5]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer2D")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("7_t07v0")
}],
"times": PackedFloat32Array(0)
}
tracks/1/use_blend = true
2024-06-24 16:08:53 -07:00
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Anchor/Flame:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [Vector2(15, -4), Vector2(14, -4), Vector2(13, -4), Vector2(12, -4), Vector2(11, -4), Vector2(9, -4)]
2024-06-24 16:08:53 -07:00
}
2023-09-10 17:08:14 -07:00
2024-07-06 22:49:17 -07:00
[sub_resource type="Animation" id="Animation_j5qtq"]
2023-09-10 17:08:14 -07:00
resource_name = "fire"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor/Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [7]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer2D")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.03,
"stream": ExtResource("9_v051g")
}],
"times": PackedFloat32Array(0)
}
tracks/1/use_blend = true
2024-06-24 16:08:53 -07:00
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Anchor/Flame:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(15, -4)]
2024-06-24 16:08:53 -07:00
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Anchor/Flame:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
2023-09-10 17:08:14 -07:00
[sub_resource type="Animation" id="Animation_riv7t"]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Anchor/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="AnimationLibrary" id="AnimationLibrary_5vx8d"]
_data = {
"RESET": SubResource("Animation_h0fti"),
2024-07-06 22:49:17 -07:00
"alt_fire": SubResource("Animation_bejvb"),
2023-09-10 17:08:14 -07:00
"charge": SubResource("Animation_8qr8x"),
2024-07-06 22:49:17 -07:00
"fire": SubResource("Animation_j5qtq"),
2023-09-10 17:08:14 -07:00
"idle": SubResource("Animation_riv7t")
}
2023-11-09 16:22:52 -08:00
[sub_resource type="CircleShape2D" id="CircleShape2D_6b356"]
2024-07-06 22:49:17 -07:00
[node name="Bow" type="Node2D" node_paths=PackedStringArray("StateMachine")]
2023-09-10 17:08:14 -07:00
y_sort_enabled = true
2024-06-24 16:08:53 -07:00
script = ExtResource("1_ikgu2")
2023-09-10 17:08:14 -07:00
Projectile = ExtResource("2_mvw0j")
ChargeTime = 0.5
2024-07-06 22:49:17 -07:00
StateMachine = NodePath("StateMachine")
2023-09-10 17:08:14 -07:00
Damage = 20.0
UseTime = 0.5
2024-07-06 22:49:17 -07:00
UseAltTime = 0.2
2023-09-10 17:08:14 -07:00
Knockback = 64.0
InitialVelocity = 200.0
ShouldFreezeAngleOnUse = false
PlayerLevelGain = 1.0
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState")]
script = ExtResource("3_pg4gy")
InitialState = NodePath("Idle")
UsedItemStates = Array[NodePath]([NodePath("Charge"), NodePath("Fire")])
2024-07-06 22:49:17 -07:00
UsedItemAltStates = Array[NodePath]([NodePath("AltFire")])
2023-09-10 17:08:14 -07:00
DeusedItemStates = Array[NodePath]([NodePath("Idle")])
2024-07-06 22:49:17 -07:00
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("FireState", "AltFireState", "Weapon", "AnimationPlayer")]
2023-09-10 17:08:14 -07:00
script = ExtResource("3_uxif8")
FireState = NodePath("../Charge")
2024-07-06 22:49:17 -07:00
AltFireState = NodePath("../AltFire")
2023-09-10 17:08:14 -07:00
Weapon = NodePath("../..")
AnimationPlayer = NodePath("../../AnimationPlayer")
AnimationKey = "idle"
[node name="Charge" type="Node" parent="StateMachine" node_paths=PackedStringArray("Weapon", "FireState", "IdleState", "AnimationPlayer")]
script = ExtResource("5_k8y6f")
Weapon = NodePath("../..")
FireState = NodePath("../Fire")
IdleState = NodePath("../Idle")
AnimationPlayer = NodePath("../../AnimationPlayer")
AnimationKey = "charge"
[node name="Fire" type="Node" parent="StateMachine" node_paths=PackedStringArray("Weapon", "IdleState", "AnimationPlayer")]
script = ExtResource("4_moo4d")
Weapon = NodePath("../..")
IdleState = NodePath("../Idle")
AnimationPlayer = NodePath("../../AnimationPlayer")
AnimationKey = "fire"
2024-07-06 22:49:17 -07:00
[node name="AltFire" type="Node" parent="StateMachine" node_paths=PackedStringArray("Bow", "IdleState", "AnimationPlayer")]
script = ExtResource("7_l73rl")
Bow = NodePath("../..")
IdleState = NodePath("../Idle")
AnimationPlayer = NodePath("../../AnimationPlayer")
AnimationKey = "alt_fire"
AngleDeviation = 30.0
2023-09-10 17:08:14 -07:00
[node name="Anchor" type="Node2D" parent="."]
y_sort_enabled = true
position = Vector2(0, 4)
[node name="Sprite2D" type="Sprite2D" parent="Anchor"]
y_sort_enabled = true
2023-09-11 10:14:50 -07:00
position = Vector2(4, 3)
2023-09-10 17:08:14 -07:00
texture = ExtResource("1_1ghvv")
centered = false
offset = Vector2(-8, -16)
hframes = 8
2024-06-24 16:08:53 -07:00
[node name="Flame" type="AnimatedSprite2D" parent="Anchor"]
unique_name_in_owner = true
visible = false
2024-08-24 20:23:17 -07:00
modulate = Color(3, 3, 3, 1)
position = Vector2(15, -4)
2024-06-24 16:08:53 -07:00
sprite_frames = SubResource("SpriteFrames_b2khh")
autoplay = "default"
frame_progress = 0.1652
offset = Vector2(0, -4)
2024-06-24 16:08:53 -07:00
[node name="PointLight2D" type="PointLight2D" parent="Anchor/Flame"]
color = Color(1, 0.8, 0.701961, 1)
2024-08-24 20:23:17 -07:00
energy = 0.5
2024-06-24 16:08:53 -07:00
texture = ExtResource("9_tk6lc")
texture_scale = 0.13
2024-08-24 20:23:17 -07:00
[node name="Ignite" type="AudioStreamPlayer2D" parent="Anchor/Flame"]
stream = ExtResource("11_65ega")
2023-09-10 17:08:14 -07:00
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_5vx8d")
}
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
2023-09-11 10:14:50 -07:00
volume_db = -8.0
bus = &"Effects"
2023-11-09 16:22:52 -08:00
[node name="IgnitionArea" type="Area2D" parent="."]
position = Vector2(8, 0)
collision_layer = 0
collision_mask = 128
monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="IgnitionArea"]
shape = SubResource("CircleShape2D_6b356")