Files
CultManor/game/characters/player/player.tscn
T

212 lines
12 KiB
Plaintext

[gd_scene format=3 uid="uid://dtcad8tdx78tg"]
[ext_resource type="Script" uid="uid://bb8kc32sggrn2" path="res://game/characters/player/player.gd" id="1_xln5q"]
[ext_resource type="PackedScene" uid="uid://5qlocc0yu8ug" path="res://game/collision_switcher.tscn" id="2_j06tb"]
[ext_resource type="PackedScene" uid="uid://cvx6akiplg21s" path="res://game/characters/player/player_sprite.tscn" id="2_n6ad3"]
[ext_resource type="PackedScene" uid="uid://bdk23k2bypj8w" path="res://game/characters/player/state_machine/player_state_machine.tscn" id="4_ybe51"]
[ext_resource type="PackedScene" uid="uid://c0d4wfdg7xjti" path="res://game/characters/player/state_machine/player_state.tscn" id="5_65114"]
[ext_resource type="Script" uid="uid://bnxccvt265hlu" path="res://game/characters/player/state_machine/idle_state.gd" id="6_3qf5w"]
[ext_resource type="Script" uid="uid://nc62375vpnsw" path="res://game/characters/player/state_machine/walk_left_state.gd" id="7_btbyc"]
[ext_resource type="Script" uid="uid://cbv84l1duwfep" path="res://game/characters/player/state_machine/look_around_state.gd" id="7_ybe51"]
[ext_resource type="Script" uid="uid://cxa3hf7tqpeoa" path="res://game/characters/player/state_machine/jump_state.gd" id="8_ebhjm"]
[ext_resource type="Script" uid="uid://d2uiegcx4jeuk" path="res://game/characters/player/state_machine/dead_state.gd" id="9_gdxv1"]
[ext_resource type="Script" uid="uid://kufq6bwnv80t" path="res://game/characters/player/state_machine/walk_right_state.gd" id="9_wdx7h"]
[ext_resource type="Script" uid="uid://c0bbmif5ucw28" path="res://game/characters/player/state_machine/jump_left_state.gd" id="11_q2504"]
[ext_resource type="Script" uid="uid://cr0hkb4wggcys" path="res://game/characters/player/state_machine/jump_right_state.gd" id="12_l8uo5"]
[ext_resource type="Script" uid="uid://c7myrm50fnpfn" path="res://game/characters/player/state_machine/fall_state.gd" id="13_m2bqk"]
[ext_resource type="Script" uid="uid://cmimnl6jf78ao" path="res://game/characters/player/state_machine/fall_left_state.gd" id="14_2lnxg"]
[ext_resource type="Script" uid="uid://5s7ko6pcqagy" path="res://game/characters/player/state_machine/fall_right_state.gd" id="15_bfpdl"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_xln5q"]
radius = 4.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_t6gq4"]
radius = 2.0
height = 15.0
[node name="Player" type="CharacterBody2D" unique_id=508706417]
collision_layer = 128
collision_mask = 33
script = ExtResource("1_xln5q")
[node name="PlayerSprite" parent="." unique_id=237719081 instance=ExtResource("2_n6ad3")]
animation = &"jump_right"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1101386361]
position = Vector2(0, 1)
shape = SubResource("CapsuleShape2D_xln5q")
[node name="CollisionSwitcher" parent="." unique_id=601548821 node_paths=PackedStringArray("object") instance=ExtResource("2_j06tb")]
object = NodePath("..")
[node name="Camera2D" type="Camera2D" parent="." unique_id=45512317]
process_callback = 0
position_smoothing_enabled = true
[node name="Pickups" type="Node2D" parent="." unique_id=958829860]
position = Vector2(0, -24)
[node name="JumpBufferTimer" type="Timer" parent="." unique_id=740877224]
wait_time = 0.1
one_shot = true
[node name="CoyoteTimeTimer" type="Timer" parent="." unique_id=117837002]
wait_time = 0.1
one_shot = true
[node name="CenterArea2D" type="Area2D" parent="." unique_id=490866430]
collision_layer = 0
collision_mask = 35
[node name="CollisionShape2D" type="CollisionShape2D" parent="CenterArea2D" unique_id=1350886064]
shape = SubResource("CapsuleShape2D_t6gq4")
[node name="PlayerStateMachine" parent="." unique_id=633169960 node_paths=PackedStringArray("player", "initial_state") instance=ExtResource("4_ybe51")]
player = NodePath("..")
initial_state = NodePath("IdleState")
[node name="IdleState" parent="PlayerStateMachine" unique_id=739226464 node_paths=PackedStringArray("look_around_state", "player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("6_3qf5w")
look_around_state = NodePath("../LookAroundState")
player = NodePath("../..")
idle_state = NodePath(".")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath("../JumpState")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="WalkLeftState" parent="PlayerStateMachine" unique_id=195513070 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("7_btbyc")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath(".")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath("../JumpState")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="WalkRightState" parent="PlayerStateMachine" unique_id=224236087 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("9_wdx7h")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath(".")
dead_state = NodePath("../DeadState")
jump_state = NodePath("../JumpState")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="DeadState" parent="PlayerStateMachine" unique_id=2135733235 node_paths=PackedStringArray("player") instance=ExtResource("5_65114")]
script = ExtResource("9_gdxv1")
player = NodePath("../..")
[node name="JumpState" parent="PlayerStateMachine" unique_id=1592631166 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("8_ebhjm")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="JumpLeftState" parent="PlayerStateMachine" unique_id=609248752 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("11_q2504")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath(".")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="JumpRightState" parent="PlayerStateMachine" unique_id=1936273065 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("12_l8uo5")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath(".")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="FallState" parent="PlayerStateMachine" unique_id=329927506 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("13_m2bqk")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath(".")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")
[node name="FallLeftState" parent="PlayerStateMachine" unique_id=730552947 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("14_2lnxg")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath(".")
fall_right_state = NodePath("../FallRightState")
[node name="FallRightState" parent="PlayerStateMachine" unique_id=347081029 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("15_bfpdl")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath(".")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath(".")
[node name="LookAroundState" parent="PlayerStateMachine" unique_id=946166563 node_paths=PackedStringArray("player", "idle_state", "walk_left_state", "walk_right_state", "dead_state", "jump_state", "jump_left_state", "jump_right_state", "fall_state", "fall_left_state", "fall_right_state") instance=ExtResource("5_65114")]
script = ExtResource("7_ybe51")
player = NodePath("../..")
idle_state = NodePath("../IdleState")
walk_left_state = NodePath("../WalkLeftState")
walk_right_state = NodePath("../WalkRightState")
dead_state = NodePath("../DeadState")
jump_state = NodePath("../JumpState")
jump_left_state = NodePath("../JumpLeftState")
jump_right_state = NodePath("../JumpRightState")
fall_state = NodePath("../FallState")
fall_left_state = NodePath("../FallLeftState")
fall_right_state = NodePath("../FallRightState")