123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- [gd_scene load_steps=19 format=3 uid="uid://bpdyvy2681m3i"]
- [ext_resource type="Script" path="res://player/player_controller.gd" id="1"]
- [ext_resource type="Script" path="res://player/player_state_machine.gd" id="2"]
- [ext_resource type="Script" path="res://player/states/motion/on_ground/idle.gd" id="3"]
- [ext_resource type="Script" path="res://player/states/motion/on_ground/move.gd" id="4"]
- [ext_resource type="Script" path="res://player/states/motion/in_air/jump.gd" id="5"]
- [ext_resource type="Script" path="res://player/states/combat/stagger.gd" id="6"]
- [ext_resource type="Script" path="res://player/states/combat/attack.gd" id="7"]
- [ext_resource type="Script" path="res://player/states/die.gd" id="8"]
- [ext_resource type="Texture2D" uid="uid://eds33w28pilu" path="res://player/shadow.png" id="9"]
- [ext_resource type="Texture2D" uid="uid://ds53oxkqrcumd" path="res://player/body.png" id="10"]
- [ext_resource type="Script" path="res://player/bullet/bullet_spawner.gd" id="11"]
- [ext_resource type="Script" path="res://player/weapon/weapon_pivot.gd" id="12"]
- [ext_resource type="PackedScene" uid="uid://cdacdp11r3jua" path="res://player/weapon/Sword.tscn" id="13"]
- [ext_resource type="Script" path="res://player/states/debug/state_name_displayer.gd" id="15"]
- [sub_resource type="Animation" id="1"]
- [sub_resource type="Animation" id="2"]
- length = 0.6
- tracks/0/type = "value"
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/path = NodePath("BodyPivot/Body:modulate")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/keys = {
- "times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.4),
- "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
- "update": 0,
- "values": [Color(1, 1, 1, 1), Color(1, 0, 0, 1), Color(1, 1, 1, 1), Color(1, 0, 0, 1), Color(1, 1, 1, 1), Color(1, 0, 0, 1), Color(1, 1, 1, 1)]
- }
- [sub_resource type="Animation" id="3"]
- [sub_resource type="AnimationLibrary" id="AnimationLibrary_vi1hn"]
- _data = {
- "idle": SubResource("1"),
- "stagger": SubResource("2"),
- "walk": SubResource("3")
- }
- [node name="Player" type="CharacterBody2D"]
- script = ExtResource("1")
- [node name="StateMachine" type="Node" parent="."]
- script = ExtResource("2")
- [node name="Idle" type="Node" parent="StateMachine"]
- script = ExtResource("3")
- [node name="Move" type="Node" parent="StateMachine"]
- script = ExtResource("4")
- [node name="Jump" type="Node" parent="StateMachine"]
- script = ExtResource("5")
- [node name="Stagger" type="Node" parent="StateMachine"]
- script = ExtResource("6")
- [node name="Attack" type="Node" parent="StateMachine"]
- script = ExtResource("7")
- [node name="Die" type="Node" parent="StateMachine"]
- script = ExtResource("8")
- [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
- libraries = {
- "": SubResource("AnimationLibrary_vi1hn")
- }
- [node name="Shadow" type="Sprite2D" parent="."]
- self_modulate = Color(1, 1, 1, 0.361098)
- position = Vector2(0, -4)
- texture = ExtResource("9")
- [node name="BodyPivot" type="Marker2D" parent="."]
- [node name="Body" type="Sprite2D" parent="BodyPivot"]
- position = Vector2(0, -58)
- texture = ExtResource("10")
- [node name="BulletSpawn" type="Node2D" parent="BodyPivot"]
- position = Vector2(0, -58)
- script = ExtResource("11")
- [node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn"]
- wait_time = 0.2
- one_shot = true
- [node name="WeaponPivot" type="Marker2D" parent="BodyPivot"]
- position = Vector2(0, -58)
- script = ExtResource("12")
- [node name="Offset" type="Marker2D" parent="BodyPivot/WeaponPivot"]
- position = Vector2(110, 0)
- [node name="Sword" parent="BodyPivot/WeaponPivot/Offset" instance=ExtResource("13")]
- [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
- polygon = PackedVector2Array(-20, 0, -20, -20, 20, -20, 20, 0)
- [node name="StateNameDisplayer" type="Label" parent="."]
- offset_left = -109.0
- offset_top = -180.0
- offset_right = 110.0
- offset_bottom = -143.0
- theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
- theme_override_constants/outline_size = 8
- theme_override_font_sizes/font_size = 24
- text = "Idle"
- horizontal_alignment = 1
- uppercase = true
- script = ExtResource("15")
- [connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"]
- [connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
- [connection signal="animation_finished" from="AnimationPlayer" to="StateMachine" method="_on_animation_finished"]
- [connection signal="attack_finished" from="BodyPivot/WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"]
|