diff --git a/objects/player/player.gd b/objects/player/player.gd index ee3b6fe..286f2e1 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -80,6 +80,12 @@ func _ready() -> void: state_chart.set_guard_property("red_feather", false) # state chart debug $StateDebugLayer/StateChartDebug.target = state_chart + # set lung size + if Game.difficulty == Game.Difficulty.SWEET: + oxygen_timer.set_wait_time(25) + if Game.difficulty == Game.Difficulty.PUNGENT: + oxygen_timer.set_wait_time(15) + oxygen_timer.start() func _physics_process(delta: float) -> void: # snap sprite diff --git a/objects/player/player.tscn b/objects/player/player.tscn index d4675fa..ac130fb 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -1519,8 +1519,7 @@ custom_styles/bg = SubResource( 4 ) script = ExtResource( 8 ) [node name="OxygenTimer" type="Timer" parent="."] -wait_time = 15.0 -autostart = true +wait_time = 20.0 [node name="JumpPeakTimer" type="Timer" parent="."] wait_time = 0.2 @@ -1543,8 +1542,8 @@ align = 1 [connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"] -[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement_grounded"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement_grounded"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Still" to="." method="_on_Still_state_entered"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Walking" to="." method="_on_Walking_state_entered"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Blinking" to="." method="_on_Blinking_state_entered"]