Files
colors-path/Scenes/player.tscn
T

190 lines
5.8 KiB
Plaintext

[gd_scene format=3 uid="uid://clou8utau45i4"]
[ext_resource type="Script" uid="uid://c2i14suu68a73" path="res://Scenes/player.gd" id="1_cvnsp"]
[ext_resource type="Texture2D" uid="uid://bdf38o7iql2u0" path="res://Assets/herochar sprites(new)/herochar_jump_down_anim_strip_3.png" id="2_f1ek2"]
[ext_resource type="Script" uid="uid://cisw1pbrlyxm" path="res://Scenes/state_machine.gd" id="2_sm"]
[ext_resource type="Texture2D" uid="uid://cjmw1ofr5xpdr" path="res://Assets/herochar sprites(new)/herochar_idle_anim_strip_4.png" id="2_x3wgy"]
[ext_resource type="Texture2D" uid="uid://cv5k6mwf8h7gu" path="res://Assets/herochar sprites(new)/herochar_run_anim_strip_6.png" id="3_3smsa"]
[ext_resource type="Script" uid="uid://bj1ixrobo52xl" path="res://Scenes/states/idle.gd" id="3_idle"]
[ext_resource type="Script" uid="uid://dn0kql6e3xks4" path="res://Scenes/states/run.gd" id="4_run"]
[ext_resource type="Texture2D" uid="uid://j7wi6lleeuhs" path="res://Assets/herochar sprites(new)/herochar_jump_up_anim_strip_3.png" id="4_tx1dd"]
[ext_resource type="Script" uid="uid://cs4hwvx5e2aag" path="res://Scenes/states/jump.gd" id="5_jump"]
[ext_resource type="Script" uid="uid://bojgwc2h0yevj" path="res://Scenes/states/fall.gd" id="10_tx1dd"]
[ext_resource type="Script" uid="uid://kjmyw7k0wrla" path="res://Scenes/label.gd" id="11_gymyn"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qqcod"]
atlas = ExtResource("2_f1ek2")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_igrcy"]
atlas = ExtResource("2_f1ek2")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_fs7ks"]
atlas = ExtResource("2_f1ek2")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_3smsa"]
atlas = ExtResource("2_x3wgy")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_8erm5"]
atlas = ExtResource("2_x3wgy")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ek2"]
atlas = ExtResource("2_x3wgy")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_tx1dd"]
atlas = ExtResource("2_x3wgy")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_l6n3p"]
atlas = ExtResource("4_tx1dd")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_olqyp"]
atlas = ExtResource("4_tx1dd")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_wpjfl"]
atlas = ExtResource("4_tx1dd")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gymyn"]
atlas = ExtResource("3_3smsa")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_pu2lt"]
atlas = ExtResource("3_3smsa")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ukyrk"]
atlas = ExtResource("3_3smsa")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_7dp3o"]
atlas = ExtResource("3_3smsa")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_h4iuc"]
atlas = ExtResource("3_3smsa")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_fd4e3"]
atlas = ExtResource("3_3smsa")
region = Rect2(80, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_d64oy"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qqcod")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_igrcy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fs7ks")
}],
"loop": 1,
"name": &"fall",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3smsa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8erm5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ek2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tx1dd")
}],
"loop": 1,
"name": &"idle",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l6n3p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_olqyp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wpjfl")
}],
"loop": 1,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gymyn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pu2lt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ukyrk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7dp3o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h4iuc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fd4e3")
}],
"loop": 1,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qdo6p"]
radius = 5.0
height = 14.0
[node name="Player" type="CharacterBody2D" unique_id=1453597893]
script = ExtResource("1_cvnsp")
[node name="Sprite2D" type="AnimatedSprite2D" parent="." unique_id=639546204]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_d64oy")
animation = &"fall"
autoplay = "idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1900030806]
position = Vector2(0, 1)
shape = SubResource("CapsuleShape2D_qdo6p")
[node name="StateMachine" type="Node" parent="." unique_id=1116320763]
script = ExtResource("2_sm")
initial_state_name = "Idle"
[node name="Idle" type="Node" parent="StateMachine" unique_id=885596976]
script = ExtResource("3_idle")
[node name="Run" type="Node" parent="StateMachine" unique_id=390570174]
script = ExtResource("4_run")
[node name="Jump" type="Node" parent="StateMachine" unique_id=1944532294]
script = ExtResource("5_jump")
[node name="Fall" type="Node" parent="StateMachine" unique_id=1119815676]
script = ExtResource("10_tx1dd")
[node name="Label" type="Label" parent="." unique_id=1537806562]
offset_left = -19.0
offset_top = -31.0
offset_right = 21.0
offset_bottom = -8.0
text = "State"
script = ExtResource("11_gymyn")