[gd_scene load_steps=88 format=3 uid="uid://2f3x4fcr0os6"] [ext_resource type="Texture2D" uid="uid://ci24lybfsaxd0" path="res://objects/player.png" id="1_2mhpo"] [ext_resource type="Script" uid="uid://drpdjfp0o7bbv" path="res://objects/player.gd" id="1_c7kgv"] [ext_resource type="Script" uid="uid://e6q7q0ljb34u" path="res://scripts/state_collision.gd" id="1_uxov2"] [ext_resource type="Script" uid="uid://cgeaq15vi0bnd" path="res://objects/player_sprite.gd" id="3_uxov2"] [sub_resource type="AtlasTexture" id="AtlasTexture_ykyjo"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_uxov2"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_nmc1l"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_f46kd"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_3rerk"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_i825w"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_3rfka"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 602, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_i8sra"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_4vq5b"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_3nfmf"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_42cpl"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_vqq2l"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_r673r"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_mqnmn"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_5esnd"] atlas = ExtResource("1_2mhpo") region = Rect2(245, 344, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_w1o2u"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 0, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_s4hvt"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 0, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_2sux5"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 0, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_iqfnf"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 0, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_bhqug"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 258, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_cyhxw"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_wq66c"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_183dw"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_nflk0"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_uqwil"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_ggel1"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_d8ffw"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 473, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_2ve04"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 215, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_0rhe2"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 172, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_6ypbn"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_7rsoo"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_lywsn"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_cvk82"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_77i28"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_mle5l"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_i4kk0"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_s854h"] atlas = ExtResource("1_2mhpo") region = Rect2(245, 387, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_tj211"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 301, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_kqdjh"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 301, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_a5pfi"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 301, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_f2hc5"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 430, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_sktdc"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_ghhh6"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_dibtv"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_d4anp"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_ct16p"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_arub5"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_4g3oa"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 559, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_r7a5p"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_kmthn"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_775wt"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_dsdn8"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_q7t1j"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_f0f2d"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_jxo55"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_jilkr"] atlas = ExtResource("1_2mhpo") region = Rect2(245, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_uyug2"] atlas = ExtResource("1_2mhpo") region = Rect2(280, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_4jwck"] atlas = ExtResource("1_2mhpo") region = Rect2(315, 129, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_07yoj"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_fhocf"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_78ho2"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_8ch2p"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_f4byu"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_b5c7i"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_evbvi"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_ye2nl"] atlas = ExtResource("1_2mhpo") region = Rect2(245, 86, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_l3yn6"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_1crfk"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_7lcwi"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_g8y8i"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_bb8rj"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_il2j7"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 43, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_p2pxn"] atlas = ExtResource("1_2mhpo") region = Rect2(0, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_e728x"] atlas = ExtResource("1_2mhpo") region = Rect2(35, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_wmx0i"] atlas = ExtResource("1_2mhpo") region = Rect2(70, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_llth5"] atlas = ExtResource("1_2mhpo") region = Rect2(105, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_4wu0g"] atlas = ExtResource("1_2mhpo") region = Rect2(140, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_isejg"] atlas = ExtResource("1_2mhpo") region = Rect2(175, 516, 35, 43) [sub_resource type="AtlasTexture" id="AtlasTexture_cebk3"] atlas = ExtResource("1_2mhpo") region = Rect2(210, 516, 35, 43) [sub_resource type="SpriteFrames" id="SpriteFrames_blchw"] animations = [{ "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_ykyjo") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_uxov2") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_nmc1l") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_f46kd") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_3rerk") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_i825w") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_3rfka") }], "loop": false, "name": &"air_kick", "speed": 24.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_i8sra") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_4vq5b") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_3nfmf") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_42cpl") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_vqq2l") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_r673r") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_mqnmn") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_5esnd") }], "loop": false, "name": &"damage", "speed": 12.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_w1o2u") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_s4hvt") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_2sux5") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_iqfnf") }], "loop": true, "name": &"default", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_bhqug") }], "loop": false, "name": &"fall", "speed": 1.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_cyhxw") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_wq66c") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_183dw") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_nflk0") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_uqwil") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ggel1") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_d8ffw") }], "loop": false, "name": &"jab", "speed": 36.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_2ve04") }], "loop": false, "name": &"jump", "speed": 12.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_0rhe2") }], "loop": false, "name": &"jump_start", "speed": 12.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_6ypbn") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_7rsoo") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_lywsn") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_cvk82") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_77i28") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_mle5l") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_i4kk0") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_s854h") }], "loop": false, "name": &"knockdown", "speed": 18.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_tj211") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_kqdjh") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_a5pfi") }], "loop": false, "name": &"land", "speed": 12.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_f2hc5") }], "loop": false, "name": &"lay", "speed": 0.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_sktdc") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ghhh6") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_dibtv") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_d4anp") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ct16p") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_arub5") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_4g3oa") }], "loop": false, "name": &"pound", "speed": 18.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_r7a5p") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_kmthn") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_775wt") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_dsdn8") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_q7t1j") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_f0f2d") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_jxo55") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_jilkr") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_uyug2") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_4jwck") }], "loop": false, "name": &"roll", "speed": 18.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_07yoj") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_fhocf") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_78ho2") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_8ch2p") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_f4byu") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_b5c7i") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_evbvi") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ye2nl") }], "loop": true, "name": &"run", "speed": 15.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_l3yn6") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_1crfk") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_7lcwi") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_g8y8i") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_bb8rj") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_il2j7") }], "loop": false, "name": &"run_start", "speed": 18.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_p2pxn") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_e728x") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_wmx0i") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_llth5") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_4wu0g") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_isejg") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_cebk3") }], "loop": false, "name": &"straight", "speed": 24.0 }] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_f46kd"] radius = 8.0 height = 16.0 [sub_resource type="GDScript" id="GDScript_uxov2"] script/source = "extends CollisionState2D func _on_player_state_change(_old: Player.States, new: Player.States) -> void: change_shape(Player.States.keys()[new]) " [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_nmc1l"] radius = 6.0 height = 22.0 [node name="Player" type="CharacterBody2D"] z_index = 10 floor_constant_speed = true floor_snap_length = 2.0 script = ExtResource("1_c7kgv") [node name="AudioPlayer" type="AudioStreamPlayer" parent="."] max_polyphony = 2 [node name="Sprite" type="AnimatedSprite2D" parent="."] position = Vector2(0, -11) sprite_frames = SubResource("SpriteFrames_blchw") animation = &"roll" frame = 4 offset = Vector2(0, -0.5) script = ExtResource("3_uxov2") [node name="Hitbox" type="CollisionShape2D" parent="."] position = Vector2(0, -11) shape = SubResource("CapsuleShape2D_f46kd") script = SubResource("GDScript_uxov2") Shapes = Dictionary[String, Shape2D]({ "IDLE": SubResource("CapsuleShape2D_nmc1l") }) metadata/_custom_type_script = "uid://e6q7q0ljb34u" [node name="State" type="Label" parent="."] offset_left = -40.0 offset_top = -56.0 offset_right = 40.0 offset_bottom = -24.0 [node name="Attackbox" type="Area2D" parent="."] [node name="CollisionState2D" type="CollisionShape2D" parent="Attackbox"] script = ExtResource("1_uxov2") metadata/_custom_type_script = "uid://e6q7q0ljb34u" [connection signal="state_change" from="." to="Hitbox" method="_on_player_state_change"] [connection signal="animation_finished" from="Sprite" to="Sprite" method="_on_animation_finished"]