Added other player states
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
[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"]
|
||||
|
||||
[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="AnimatedSprite2D" parent="." unique_id=237719081 instance=ExtResource("2_n6ad3")]
|
||||
animation = &"death"
|
||||
|
||||
[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", "dead_state", "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", "idle_state", "walk_state", "jump_state") instance=ExtResource("5_65114")]
|
||||
script = ExtResource("6_3qf5w")
|
||||
look_around_state = NodePath("../LookAroundState")
|
||||
player = NodePath("../..")
|
||||
idle_state = NodePath(".")
|
||||
walk_state = NodePath("../WalkLeftState")
|
||||
jump_state = NodePath("../JumpState")
|
||||
|
||||
[node name="LookAroundState" parent="PlayerStateMachine" unique_id=946166563 node_paths=PackedStringArray("player", "idle_state", "walk_state", "jump_state") instance=ExtResource("5_65114")]
|
||||
script = ExtResource("7_ybe51")
|
||||
player = NodePath("../..")
|
||||
idle_state = NodePath("../IdleState")
|
||||
walk_state = NodePath("../WalkLeftState")
|
||||
jump_state = NodePath("../JumpState")
|
||||
|
||||
[node name="WalkLeftState" parent="PlayerStateMachine" unique_id=195513070 instance=ExtResource("5_65114")]
|
||||
script = ExtResource("7_btbyc")
|
||||
player = Object(CharacterBody2D,"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"proce
|
||||
Reference in New Issue
Block a user