123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- [gd_scene load_steps=20 format=2]
- [ext_resource path="res://player/player_controller.gd" type="Script" id=1]
- [ext_resource path="res://player/player_state_machine.gd" type="Script" id=2]
- [ext_resource path="res://player/states/motion/on_ground/idle.gd" type="Script" id=3]
- [ext_resource path="res://player/states/motion/on_ground/move.gd" type="Script" id=4]
- [ext_resource path="res://player/states/motion/in_air/jump.gd" type="Script" id=5]
- [ext_resource path="res://player/states/combat/stagger.gd" type="Script" id=6]
- [ext_resource path="res://player/states/combat/attack.gd" type="Script" id=7]
- [ext_resource path="res://player/states/die.gd" type="Script" id=8]
- [ext_resource path="res://player/shadow.png" type="Texture" id=9]
- [ext_resource path="res://player/body.png" type="Texture" id=10]
- [ext_resource path="res://player/bullet/bullet_spawner.gd" type="Script" id=11]
- [ext_resource path="res://player/weapon/weapon_pivot.gd" type="Script" id=12]
- [ext_resource path="res://player/weapon/Sword.tscn" type="PackedScene" id=13]
- [ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=14]
- [ext_resource path="res://player/states/debug/state_name_displayer.gd" type="Script" id=15]
- [sub_resource type="Animation" id=1]
- length = 1.0
- loop = false
- step = 0.1
- [sub_resource type="Animation" id=2]
- length = 0.6
- loop = false
- step = 0.1
- tracks/0/type = "value"
- tracks/0/path = NodePath("BodyPivot/Body:modulate")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/keys = {
- "times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.4 ),
- "transitions": PoolRealArray( 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]
- length = 1.0
- loop = false
- step = 0.1
- [sub_resource type="DynamicFont" id=4]
- size = 20
- use_mipmaps = false
- use_filter = true
- font_data = ExtResource( 14 )
- _sections_unfolded = [ "Font", "Settings" ]
- [node name="Player" type="KinematicBody2D" index="0"]
- position = Vector2( 628.826, 391.266 )
- input_pickable = false
- collision_layer = 1
- collision_mask = 1
- collision/safe_margin = 0.08
- script = ExtResource( 1 )
- _sections_unfolded = [ "Visibility" ]
- __meta__ = {
- "_edit_horizontal_guides_": [ ]
- }
- [node name="StateMachine" type="Node" parent="." index="0"]
- script = ExtResource( 2 )
- START_STATE = NodePath("Idle")
- [node name="Idle" type="Node" parent="StateMachine" index="0"]
- script = ExtResource( 3 )
- [node name="Move" type="Node" parent="StateMachine" index="1"]
- script = ExtResource( 4 )
- MAX_WALK_SPEED = 450
- MAX_RUN_SPEED = 700
- [node name="Jump" type="Node" parent="StateMachine" index="2"]
- script = ExtResource( 5 )
- BASE_MAX_HORIZONTAL_SPEED = 400.0
- AIR_ACCELERATION = 1000.0
- AIR_DECCELERATION = 2000.0
- AIR_STEERING_POWER = 50.0
- JUMP_HEIGHT = 120.0
- JUMP_DURATION = 0.8
- GRAVITY = 1600.0
- [node name="Stagger" type="Node" parent="StateMachine" index="3"]
- script = ExtResource( 6 )
- [node name="Attack" type="Node" parent="StateMachine" index="4"]
- script = ExtResource( 7 )
- [node name="Die" type="Node" parent="StateMachine" index="5"]
- script = ExtResource( 8 )
- [node name="AnimationPlayer" type="AnimationPlayer" parent="." index="1"]
- root_node = NodePath("..")
- autoplay = ""
- playback_process_mode = 1
- playback_default_blend_time = 0.0
- playback_speed = 1.0
- anims/idle = SubResource( 1 )
- anims/stagger = SubResource( 2 )
- anims/walk = SubResource( 3 )
- blend_times = [ ]
- [node name="Shadow" type="Sprite" parent="." index="2"]
- self_modulate = Color( 1, 1, 1, 0.361098 )
- position = Vector2( 0, -4 )
- texture = ExtResource( 9 )
- _sections_unfolded = [ "Visibility" ]
- [node name="BodyPivot" type="Position2D" parent="." index="3"]
- [node name="Body" type="Sprite" parent="BodyPivot" index="0"]
- position = Vector2( 0, -58.8242 )
- texture = ExtResource( 10 )
- [node name="BulletSpawn" type="Node2D" parent="BodyPivot" index="1"]
- editor/display_folded = true
- position = Vector2( 1.17401, -61.266 )
- script = ExtResource( 11 )
- _sections_unfolded = [ "Transform" ]
- [node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn" index="0"]
- process_mode = 1
- wait_time = 0.2
- one_shot = true
- autostart = false
- [node name="WeaponPivot" type="Position2D" parent="BodyPivot" index="2"]
- position = Vector2( 1.17401, -61.266 )
- script = ExtResource( 12 )
- [node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot" index="0"]
- position = Vector2( 110, 0 )
- [node name="Sword" parent="BodyPivot/WeaponPivot/Offset" index="0" instance=ExtResource( 13 )]
- [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." index="4"]
- build_mode = 0
- polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 )
- [node name="StateNameDisplayer" type="Label" parent="." index="5"]
- editor/display_folded = true
- anchor_left = 0.0
- anchor_top = 0.0
- anchor_right = 0.0
- anchor_bottom = 0.0
- margin_left = -109.0
- margin_top = -172.0
- margin_right = 110.0
- margin_bottom = -138.0
- rect_pivot_offset = Vector2( 0, 0 )
- rect_clip_content = false
- mouse_filter = 2
- mouse_default_cursor_shape = 0
- size_flags_horizontal = 1
- size_flags_vertical = 4
- custom_fonts/font = SubResource( 4 )
- text = "Test"
- align = 1
- valign = 1
- uppercase = true
- percent_visible = 1.0
- lines_skipped = 0
- max_lines_visible = -1
- script = ExtResource( 15 )
- _sections_unfolded = [ "Rect", "custom_fonts" ]
- [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"]
|