SupaLidlGame/Characters/Player.tscn

336 lines
10 KiB
Plaintext

[gd_scene load_steps=39 format=3 uid="uid://b2254pup8k161"]
[ext_resource type="Script" path="res://Characters/Player.cs" id="1_flygr"]
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="2_ngsgt"]
[ext_resource type="Texture2D" uid="uid://bej8thq7ruyty" path="res://Assets/Sprites/Characters/forsen2.png" id="4_5vird"]
[ext_resource type="PackedScene" uid="uid://cl56eadpklnbo" path="res://Utils/PlayerCamera.tscn" id="4_ym125"]
[ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="5_rgckv"]
[ext_resource type="Script" path="res://State/Character/PlayerIdleState.cs" id="6_wkfdm"]
[ext_resource type="PackedScene" uid="uid://dvqap2uhcah63" path="res://Items/Weapons/Sword.tscn" id="7_4rxuv"]
[ext_resource type="Script" path="res://State/Character/PlayerMoveState.cs" id="7_dfqd8"]
[ext_resource type="Script" path="res://Items/Inventory.cs" id="7_xyenu"]
[ext_resource type="Script" path="res://State/Character/PlayerRollState.cs" id="8_fy0v5"]
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="9_avyu4"]
[ext_resource type="AudioStream" uid="uid://bkeyg8weaqnuu" path="res://Assets/Sounds/splat-player.ogg" id="12_vvem5"]
[ext_resource type="Script" path="res://BoundingBoxes/InteractionRay.cs" id="13_hs3u1"]
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="14_l4ekh"]
[ext_resource type="Script" path="res://Utils/DamageTime.cs" id="15_4xl06"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h78y7"]
shader = ExtResource("2_ngsgt")
shader_parameter/color = Quaternion(1, 1, 1, 1)
shader_parameter/intensity = 0.0
[sub_resource type="AtlasTexture" id="AtlasTexture_55yt4"]
atlas = ExtResource("4_5vird")
region = Rect2(0, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_xa1bi"]
atlas = ExtResource("4_5vird")
region = Rect2(24, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_hiodl"]
atlas = ExtResource("4_5vird")
region = Rect2(48, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_tok7d"]
atlas = ExtResource("4_5vird")
region = Rect2(72, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_dp8x6"]
atlas = ExtResource("4_5vird")
region = Rect2(96, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_sglor"]
atlas = ExtResource("4_5vird")
region = Rect2(120, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_gb41o"]
atlas = ExtResource("4_5vird")
region = Rect2(144, 0, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_bx6qq"]
atlas = ExtResource("4_5vird")
region = Rect2(168, 0, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_2h7cf"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_55yt4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xa1bi")
}],
"loop": true,
"name": &"idle",
"speed": 2.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hiodl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tok7d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dp8x6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sglor")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gb41o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bx6qq")
}],
"loop": true,
"name": &"move",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bfqew"]
size = Vector2(12, 8)
[sub_resource type="LabelSettings" id="LabelSettings_q5h1n"]
font_size = 24
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cjk6b"]
size = Vector2(8, 8)
[sub_resource type="Animation" id="Animation_dxevc"]
resource_name = "Hurt"
length = 0.6
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:material:shader_parameter/intensity")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6),
"transitions": PackedFloat32Array(4, 4, 4, 4, 4, 4, 4),
"update": 0,
"values": [0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0]
}
[sub_resource type="Animation" id="Animation_k6l16"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:material:shader_parameter/intensity")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xe5eq"]
_data = {
"Hurt": SubResource("Animation_dxevc"),
"RESET": SubResource("Animation_k6l16")
}
[sub_resource type="Animation" id="Animation_yejx2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_rx2pj"]
resource_name = "roll"
length = 0.5
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.25, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 3.14159, 6.28319]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jai06"]
_data = {
"RESET": SubResource("Animation_yejx2"),
"roll": SubResource("Animation_rx2pj")
}
[sub_resource type="Gradient" id="Gradient_3tax5"]
offsets = PackedFloat32Array(0.533333, 1)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_pjeh8"]
gradient = SubResource("Gradient_3tax5")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_humq0"]
emission_shape = 1
emission_sphere_radius = 1.0
particle_flag_disable_z = true
direction = Vector3(0, 0, 0)
spread = 180.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 32.0
initial_velocity_max = 32.0
orbit_velocity_min = 0.0
orbit_velocity_max = 0.1
tangential_accel_min = 64.0
tangential_accel_max = 64.0
color_ramp = SubResource("GradientTexture1D_pjeh8")
[sub_resource type="CanvasTexture" id="CanvasTexture_pited"]
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Camera", "DirectionMarker", "Sprite", "Inventory", "StateMachine", "Hurtbox")]
y_sort_enabled = true
texture_filter = 3
material = SubResource("ShaderMaterial_h78y7")
position = Vector2(1, -12)
collision_layer = 6
collision_mask = 17
script = ExtResource("1_flygr")
Camera = NodePath("Camera2D")
DirectionMarker = NodePath("Direction2D")
Speed = 64.0
Sprite = NodePath("Sprite")
Inventory = NodePath("Inventory")
StateMachine = NodePath("StateMachine")
Hurtbox = NodePath("Hurtbox")
Faction = 1
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
script = ExtResource("5_rgckv")
InitialState = NodePath("Idle")
Character = NodePath("..")
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState", "IdleState", "Character")]
script = ExtResource("6_wkfdm")
MoveState = NodePath("../Move")
IdleState = NodePath(".")
Character = NodePath("../..")
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("RollState", "IdleState", "Character")]
script = ExtResource("7_dfqd8")
RollState = NodePath("../Roll")
IdleState = NodePath("../Idle")
Character = NodePath("../..")
[node name="Roll" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
script = ExtResource("8_fy0v5")
IdleState = NodePath("../Idle")
Character = NodePath("../..")
[node name="Camera2D" parent="." instance=ExtResource("4_ym125")]
position_smoothing_speed = 8.0
[node name="Sprite" type="AnimatedSprite2D" parent="."]
use_parent_material = true
position = Vector2(0, 4)
sprite_frames = SubResource("SpriteFrames_2h7cf")
animation = &"idle"
offset = Vector2(0, -4)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 8)
shape = SubResource("RectangleShape2D_bfqew")
[node name="Debug" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 0
[node name="State" type="Label" parent="Debug"]
layout_mode = 0
offset_left = -20.0
offset_top = -60.0
offset_right = 20.0
offset_bottom = -34.0
text = "lol"
label_settings = SubResource("LabelSettings_q5h1n")
horizontal_alignment = 1
[node name="Node" type="Node" parent="."]
[node name="Inventory" type="Node2D" parent="."]
position = Vector2(0, 4)
script = ExtResource("7_xyenu")
InventoryMap = {
"equip_1": 0,
"equip_2": 1
}
[node name="Node2D" parent="Inventory" instance=ExtResource("7_4rxuv")]
visible = false
ShouldHideIdle = false
[node name="Hurtbox" parent="." instance=ExtResource("9_avyu4")]
Faction = 1
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
position = Vector2(0, 6)
shape = SubResource("RectangleShape2D_cjk6b")
[node name="FlashAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_xe5eq")
}
[node name="RollAnimation" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_jai06")
}
[node name="HurtSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("12_vvem5")
max_distance = 64.0
[node name="AudioListener2D" type="AudioListener2D" parent="."]
current = true
[node name="Direction2D" type="Marker2D" parent="."]
position = Vector2(0, 6)
[node name="InteractionRay" type="RayCast2D" parent="Direction2D"]
target_position = Vector2(16, 0)
collision_mask = 64
collide_with_areas = true
script = ExtResource("13_hs3u1")
[node name="DeathParticles" type="GPUParticles2D" parent="."]
emitting = false
amount = 16
process_material = SubResource("ParticleProcessMaterial_humq0")
texture = SubResource("CanvasTexture_pited")
one_shot = true
explosiveness = 0.9
[node name="PointLight2D" type="PointLight2D" parent="."]
blend_mode = 2
shadow_enabled = true
shadow_filter = 2
shadow_filter_smooth = 3.0
texture = ExtResource("14_l4ekh")
texture_scale = 0.5
[node name="DamageTime" type="Node" parent="."]
script = ExtResource("15_4xl06")
[editable path="Hurtbox"]