diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-06-05 09:18:35 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-06-05 09:18:35 -0600 |
commit | 4b42a8ba26f21e2c6c766fa747c8b93a115a53b2 (patch) | |
tree | a688e3be103942c1a1057b65ca61ea26f57dd5ee /src/entities/actors/snake/scenes | |
parent | e4423cc8490b7f5ec3449f568bf64e81f4d03248 (diff) |
added new tiles to ground tilemap, moved player to state machine paradigm
Diffstat (limited to 'src/entities/actors/snake/scenes')
-rw-r--r-- | src/entities/actors/snake/scenes/Head.tscn | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/entities/actors/snake/scenes/Head.tscn b/src/entities/actors/snake/scenes/Head.tscn index a08197b..d69cbf8 100644 --- a/src/entities/actors/snake/scenes/Head.tscn +++ b/src/entities/actors/snake/scenes/Head.tscn @@ -1,8 +1,12 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://entities/actors/snake/sprites/head.png" type="Texture" id=1] [ext_resource path="res://entities/actors/snake/scripts/head.gd" type="Script" id=2] [ext_resource path="res://entities/actors/snake/sprites/tongue.png" type="Texture" id=3] +[ext_resource path="res://entities/actors/snake/scripts/state_machine.gd" type="Script" id=4] +[ext_resource path="res://entities/actors/snake/scripts/normal_state.gd" type="Script" id=5] +[ext_resource path="res://entities/actors/snake/scripts/dash_state.gd" type="Script" id=6] +[ext_resource path="res://entities/actors/snake/scripts/slow_state.gd" type="Script" id=7] [sub_resource type="AtlasTexture" id=2] atlas = ExtResource( 3 ) @@ -35,6 +39,20 @@ radius = 2.0 collision_mask = 262 script = ExtResource( 2 ) +[node name="StateMachine" type="Node" parent="."] +script = ExtResource( 4 ) + +[node name="NormalState" type="Node" parent="StateMachine"] +script = ExtResource( 5 ) + +[node name="DashState" type="Node" parent="StateMachine"] +script = ExtResource( 6 ) + +[node name="SlowState" type="Node" parent="StateMachine"] +script = ExtResource( 7 ) + +[node name="JumpState" type="Node" parent="StateMachine"] + [node name="Tongue" type="AnimatedSprite" parent="."] position = Vector2( 0, -5 ) frames = SubResource( 6 ) |