diff options
Diffstat (limited to 'Player.tscn')
-rw-r--r-- | Player.tscn | 261 |
1 files changed, 234 insertions, 27 deletions
diff --git a/Player.tscn b/Player.tscn index 56b6bd9..18ab703 100644 --- a/Player.tscn +++ b/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://fe6exyigjb72"] +[gd_scene load_steps=48 format=3 uid="uid://fe6exyigjb72"] [ext_resource type="Script" path="res://player.gd" id="1_d2vao"] [ext_resource type="Texture2D" uid="uid://tvalc858lt0n" path="res://Assets/Kirby/duck.png" id="1_wgfub"] @@ -6,18 +6,60 @@ [ext_resource type="Texture2D" uid="uid://c4gyxj3yaqiel" path="res://Assets/Kirby/idle.png" id="3_cldu0"] [ext_resource type="Texture2D" uid="uid://kjgx1vhvtkuf" path="res://Assets/Kirby/jump.png" id="4_c4qo5"] [ext_resource type="Texture2D" uid="uid://ba2ivfvgaoak" path="res://Assets/Kirby/fly-01.png" id="4_ueynj"] +[ext_resource type="Texture2D" uid="uid://bubv8f16w2cva" path="res://Assets/Kirby/enter-door.png" id="4_xbfs5"] +[ext_resource type="Texture2D" uid="uid://bvcldd1e40ppq" path="res://Assets/Kirby/exit-door.png" id="5_75qar"] [ext_resource type="Texture2D" uid="uid://crmqf762gvqnq" path="res://Assets/Kirby/fly-02.png" id="5_fk1ji"] [ext_resource type="Texture2D" uid="uid://chachjxdm83jr" path="res://Assets/Kirby/walk-01.png" id="5_xc0ju"] [ext_resource type="Texture2D" uid="uid://ceg3at8pva1da" path="res://Assets/Kirby/walk-02.png" id="6_0igly"] [ext_resource type="Texture2D" uid="uid://dvikuk84ldh4l" path="res://Assets/Kirby/inhale-02.png" id="6_bb7r4"] [ext_resource type="Texture2D" uid="uid://clk6xca5cfmn0" path="res://Assets/Kirby/walk-03.png" id="7_rh355"] +[ext_resource type="Texture2D" uid="uid://b7rnngemyujar" path="res://Assets/Kirby/inflated-idle.png" id="8_vsb1l"] +[ext_resource type="Texture2D" uid="uid://bplxl8ggrpoea" path="res://Assets/Kirby/inhale-01.png" id="8_xxs7c"] +[ext_resource type="Texture2D" uid="uid://dm3xyxhejdyl8" path="res://Assets/Kirby/inflated-walk-01.png" id="9_4qud5"] +[ext_resource type="Texture2D" uid="uid://c60ctgi67fblt" path="res://Assets/Kirby/inflated-jump.png" id="9_rgn34"] [ext_resource type="AudioStream" uid="uid://cib0bm11wfubt" path="res://Assets/Sounds/fall.wav" id="9_t30y2"] +[ext_resource type="Texture2D" uid="uid://drjw1f0xi078w" path="res://Assets/Kirby/inflated-walk-02.png" id="10_46wv3"] [ext_resource type="AudioStream" uid="uid://2y0km5fcbw1t" path="res://Assets/Sounds/jump.wav" id="10_gmv3e"] +[ext_resource type="AudioStream" uid="uid://cg118tdsr3oww" path="res://Assets/Sounds/fall-2.wav" id="14_o43qk"] [ext_resource type="AudioStream" uid="uid://do315gfb7gp6e" path="res://Assets/Sounds/fly.wav" id="15_wt8kq"] -[ext_resource type="AudioStream" uid="uid://bcbw5kg2o0de" path="res://Assets/Sounds/exhale.wav" id="16_bnnhu"] [ext_resource type="AudioStream" uid="uid://du08pwh5pbxlk" path="res://Assets/Sounds/inhale.wav" id="17_tcnsa"] +[ext_resource type="AudioStream" uid="uid://dch55m1hjpa7n" path="res://Assets/Sounds/star-shot.wav" id="18_8tquw"] +[ext_resource type="AudioStream" uid="uid://fc5lm052l0ci" path="res://Assets/Sounds/air-shot.wav" id="18_b0jy8"] +[ext_resource type="Texture2D" uid="uid://bqj81fpych85a" path="res://Assets/Kirby/star-small.png" id="18_jg7ph"] +[ext_resource type="Texture2D" uid="uid://d0u6jw880abmk" path="res://Assets/Kirby/air-shoot.png" id="19_8bfby"] +[ext_resource type="Texture2D" uid="uid://v3mqtnbs3e8g" path="res://Assets/Kirby/star-shot-01.png" id="20_ptn6m"] +[ext_resource type="AudioStream" uid="uid://5jbqiiboovpy" path="res://Assets/Sounds/hurt.wav" id="20_sg1wm"] +[ext_resource type="Texture2D" uid="uid://dtmf5p0rijuvw" path="res://Assets/Kirby/star-shot-02.png" id="21_v2p03"] +[ext_resource type="AudioStream" uid="uid://d2ag7ckd0pdc5" path="res://Assets/Sounds/no-hp.wav" id="21_y2drg"] +[ext_resource type="Texture2D" uid="uid://cmmuuidovdcar" path="res://Assets/Kirby/star-shot-03.png" id="22_rqvv1"] +[ext_resource type="Texture2D" uid="uid://cmf1wypv1ss5v" path="res://Assets/Kirby/star-shot-04.png" id="23_ro3gu"] +[ext_resource type="AudioStream" uid="uid://bj2jgv8dxshqs" path="res://Assets/Sounds/digest.wav" id="27_7h7h2"] +[ext_resource type="Texture2D" uid="uid://cdhe6x01onj2o" path="res://Assets/Kirby/inhale-particles.png" id="28_6706u"] +[ext_resource type="AudioStream" uid="uid://ddiik30kw4ua" path="res://Assets/Sounds/shot-obstacle-hit.wav" id="28_nwt8e"] +[ext_resource type="AudioStream" uid="uid://denc1y7sjgm3o" path="res://Assets/Sounds/enter-door.wav" id="30_bqihm"] + +[sub_resource type="Gradient" id="Gradient_1p6gt"] +offsets = PackedFloat32Array(0, 0.188525) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_i36tu"] +gradient = SubResource("Gradient_1p6gt") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_aoct8"] +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(8, 8, 1) +angle_min = -243.4 +angle_max = 1.07288e-05 +direction = Vector3(-1, 0, 0) +angular_velocity_min = 20.28 +angular_velocity_max = 81.12 +gravity = Vector3(-500, 0, 0) +radial_accel_min = -100.0 +radial_accel_max = 100.0 +color_ramp = SubResource("GradientTexture1D_i36tu") [sub_resource type="SpriteFrames" id="SpriteFrames_nb512"] +resource_local_to_scene = true animations = [{ "frames": [{ "duration": 1.0, @@ -29,6 +71,22 @@ animations = [{ }, { "frames": [{ "duration": 1.0, +"texture": ExtResource("4_xbfs5") +}], +"loop": true, +"name": &"enter_door", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5_75qar") +}], +"loop": true, +"name": &"exit_door", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, "texture": ExtResource("2_udm1i") }], "loop": true, @@ -42,9 +100,9 @@ animations = [{ "duration": 1.0, "texture": ExtResource("5_fk1ji") }], -"loop": false, +"loop": true, "name": &"fly", -"speed": 5.0 +"speed": 2.0 }, { "frames": [{ "duration": 1.0, @@ -56,6 +114,33 @@ animations = [{ }, { "frames": [{ "duration": 1.0, +"texture": ExtResource("8_vsb1l") +}], +"loop": true, +"name": &"inflated_idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("9_rgn34") +}], +"loop": true, +"name": &"inflated_jump", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("9_4qud5") +}, { +"duration": 1.0, +"texture": ExtResource("10_46wv3") +}], +"loop": true, +"name": &"inflated_walk", +"speed": 4.0 +}, { +"frames": [{ +"duration": 1.0, "texture": ExtResource("6_bb7r4") }], "loop": true, @@ -64,6 +149,14 @@ animations = [{ }, { "frames": [{ "duration": 1.0, +"texture": ExtResource("8_xxs7c") +}], +"loop": true, +"name": &"inhale_exhale_transition", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, "texture": ExtResource("4_c4qo5") }], "loop": true, @@ -91,56 +184,170 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_csxti"] radius = 7.0 -[sub_resource type="AnimationLibrary" id="AnimationLibrary_7860o"] +[sub_resource type="CircleShape2D" id="CircleShape2D_vtlrr"] +radius = 8.0 -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_nbsua"] +[sub_resource type="CircleShape2D" id="CircleShape2D_5n68u"] +radius = 8.0 -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_kjick"] -states/Inhale/node = SubResource("AnimationNodeStateMachine_nbsua") -states/Inhale/position = Vector2(430, 82) +[sub_resource type="SpriteFrames" id="SpriteFrames_wtu0n"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("20_ptn6m") +}, { +"duration": 1.0, +"texture": ExtResource("21_v2p03") +}, { +"duration": 1.0, +"texture": ExtResource("22_rqvv1") +}, { +"duration": 1.0, +"texture": ExtResource("23_ro3gu") +}], +"loop": true, +"name": &"default", +"speed": 1.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_ncpg1"] +radius = 8.0 + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wya0c"] +height = 24.0 -[node name="Player" type="CharacterBody2D"] -collision_mask = 16 +[node name="Player" type="CharacterBody2D" groups=["player"]] +collision_mask = 18 script = ExtResource("1_d2vao") +[node name="InhaleParticles" type="GPUParticles2D" parent="."] +unique_name_in_owner = true +texture_filter = 1 +position = Vector2(16, 0) +emitting = false +amount = 4 +process_material = SubResource("ParticleProcessMaterial_aoct8") +texture = ExtResource("28_6706u") +lifetime = 0.1 + [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] texture_filter = 1 sprite_frames = SubResource("SpriteFrames_nb512") -animation = &"idle" +animation = &"exit_door" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_csxti") +[node name="CollisionArea" type="Area2D" parent="."] +collision_mask = 70 + [node name="Camera2D" type="Camera2D" parent="."] +limit_left = 0 drag_horizontal_enabled = true drag_vertical_enabled = true -[node name="SoundFall" type="AudioStreamPlayer2D" parent="."] +[node name="Sounds" type="Node2D" parent="."] + +[node name="SoundFall" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true stream = ExtResource("9_t30y2") volume_db = -2.0 -[node name="SoundJump" type="AudioStreamPlayer2D" parent="."] +[node name="SoundFall2" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("14_o43qk") + +[node name="SoundJump" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true stream = ExtResource("10_gmv3e") -[node name="SoundFly" type="AudioStreamPlayer2D" parent="."] +[node name="SoundFly" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true stream = ExtResource("15_wt8kq") -volume_db = -5.0 -[node name="SoundExhale" type="AudioStreamPlayer2D" parent="."] -stream = ExtResource("16_bnnhu") - -[node name="SoundInhale" type="AudioStreamPlayer2D" parent="."] +[node name="SoundInhale" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true stream = ExtResource("17_tcnsa") +[node name="SoundAirShot" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("18_b0jy8") + +[node name="SoundStarShot" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("18_8tquw") + +[node name="SoundHurt" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("20_sg1wm") + +[node name="SoundNoHp" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("21_y2drg") + +[node name="SoundDigest" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("27_7h7h2") + +[node name="ShotObstacleHit" type="AudioStreamPlayer2D" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("28_nwt8e") + +[node name="SoundEnterDoor" type="AudioStreamPlayer" parent="Sounds"] +unique_name_in_owner = true +stream = ExtResource("30_bqihm") + +[node name="SpriteSmallStar" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, 14) +texture = ExtResource("18_jg7ph") + +[node name="AirShot" type="Area2D" parent="."] +position = Vector2(25, 0) +collision_mask = 6 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="AirShot"] +shape = SubResource("CircleShape2D_vtlrr") + +[node name="Sprite2D" type="Sprite2D" parent="AirShot"] +texture_filter = 1 +texture = ExtResource("19_8bfby") + +[node name="StarShot" type="Area2D" parent="."] +position = Vector2(44, 0) +collision_mask = 6 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StarShot"] +shape = SubResource("CircleShape2D_5n68u") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="StarShot"] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_wtu0n") + +[node name="HurtArea" type="Area2D" parent="."] +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="HurtArea"] +shape = SubResource("CircleShape2D_ncpg1") +debug_color = Color(0.558997, 0.400513, 0.991197, 0.42) + +[node name="InhaleArea" type="Area2D" parent="."] +unique_name_in_owner = true +position = Vector2(16, 0) +collision_layer = 0 +collision_mask = 6 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="InhaleArea"] +shape = SubResource("CapsuleShape2D_wya0c") + [node name="CoyoteTimer" type="Timer" parent="."] wait_time = 0.1 one_shot = true -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_7860o") -} +[node name="InhaleMinDurationTimer" type="Timer" parent="."] +one_shot = true -[node name="AnimationTree" type="AnimationTree" parent="."] -tree_root = SubResource("AnimationNodeStateMachine_kjick") -anim_player = NodePath("../AnimationPlayer") +[connection signal="body_entered" from="HurtArea" to="." method="_on_hurt_area_body_entered"] |