Added other player states
This commit is contained in:
@@ -6,10 +6,16 @@
|
||||
[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_state.gd" id="7_btbyc"]
|
||||
[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
|
||||
@@ -24,7 +30,7 @@ collision_mask = 33
|
||||
script = ExtResource("1_xln5q")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." unique_id=237719081 instance=ExtResource("2_n6ad3")]
|
||||
animation = &"death"
|
||||
animation = &"jump_right"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1101386361]
|
||||
position = Vector2(0, 1)
|
||||
@@ -55,32 +61,151 @@ 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", "dead_state", "initial_state") instance=ExtResource("4_ybe51")]
|
||||
[node name="PlayerStateMachine" parent="." unique_id=633169960 node_paths=PackedStringArray("player", "initial_state") instance=ExtResource("4_ybe51")]
|
||||
player = NodePath("..")
|
||||
dead_state = NodePath("DeadState")
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" parent="PlayerStateMachine" unique_id=739226464 node_paths=PackedStringArray("look_around_state", "player") instance=ExtResource("5_65114")]
|
||||
[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="LookAroundState" parent="PlayerStateMachine" unique_id=946166563 node_paths=PackedStringArray("idle_state", "player") instance=ExtResource("5_65114")]
|
||||
script = ExtResource("7_ybe51")
|
||||
idle_state = NodePath("../IdleState")
|
||||
player = NodePath("../..")
|
||||
|
||||
[node name="WalkState" parent="PlayerStateMachine" unique_id=195513070 node_paths=PackedStringArray("player") instance=ExtResource("5_65114")]
|
||||
[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="JumpState" parent="PlayerStateMachine" unique_id=1433721843 node_paths=PackedStringArray("player") instance=ExtResource("5_65114")]
|
||||
script = ExtResource("8_ebhjm")
|
||||
[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("../..")
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
|
||||
[connection signal="animation_looped" from="AnimatedSprite2D" to="." method="_on_animation_looped"]
|
||||
[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")
|
||||
|
||||
Reference in New Issue
Block a user