fix: die on timer despite shield, ingame control menu upause fixed
This commit is contained in:
parent
733491908d
commit
d22290e239
@ -414,6 +414,7 @@ func calculate_slope_rotation(onfloor: bool) -> float:
|
||||
func stomp() -> void:
|
||||
stomping = true
|
||||
|
||||
# TOD lose_power_up function
|
||||
func receive_power_up(kind: String) -> void:
|
||||
if kind == "shield":
|
||||
$BubbleShieldViewport/IridescenceBall.visible = true
|
||||
@ -437,6 +438,12 @@ func die(animation_number: int = 0) -> void:
|
||||
if animation_number < 1:
|
||||
$BlobbySprite/BlobbymationPlayer.play("expandingDisolve")
|
||||
|
||||
func die_for_real(animation_number: int = 0) -> void:
|
||||
shielded = false
|
||||
$BubbleShieldViewport/IridescenceBall.visible = false
|
||||
die(animation_number)
|
||||
|
||||
|
||||
# TODO Checkpoint system
|
||||
func respawn() -> void:
|
||||
# Is tied to the death animation
|
||||
@ -481,6 +488,7 @@ func _on_InvincibilityTimer_timeout() -> void:
|
||||
die()
|
||||
|
||||
func _on_PitfallTimer_timeout() -> void:
|
||||
# TODO Debuff function to remove wanted buffs
|
||||
shielded = false
|
||||
levelState.player_dying()
|
||||
respawn()
|
||||
|
||||
@ -3283,7 +3283,7 @@ tracks/6/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 1.0, -8.97473 ) ]
|
||||
"values": [ Vector2( 1, -8.97473 ) ]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/path = NodePath("../BlobbySkin/CollisionPolygon2D:shape:extents")
|
||||
@ -3307,7 +3307,7 @@ tracks/8/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 1.0, -8.97473 ) ]
|
||||
"values": [ Vector2( 1, -8.97473 ) ]
|
||||
}
|
||||
tracks/9/type = "value"
|
||||
tracks/9/path = NodePath(".:offset")
|
||||
|
||||
@ -21,7 +21,7 @@ var was_coyote_hanging = false
|
||||
|
||||
# Adds the intial states
|
||||
func _ready():
|
||||
signalManager.connect("getback_timer_up", parent, "die", [1])
|
||||
signalManager.connect("getback_timer_up", parent, "die_for_real", [1])
|
||||
signalManager.connect("power_up_collected", parent, "receive_power_up")
|
||||
signalManager.connect("got_stomped", parent, "stomp")
|
||||
anim_player.play("RESET")
|
||||
|
||||
@ -19,7 +19,7 @@ func _on_GlobalState_player_died() -> void:
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("pause") and pause_title.text != "You lost":
|
||||
if event.is_action_pressed("pause") && pause_title.text != "You lost" && !$ControlsMenu.visible:
|
||||
#not oder ! schaltet einen boolean um
|
||||
#Ist self hier notwendig?
|
||||
self.paused = not paused
|
||||
|
||||
@ -455,7 +455,7 @@ text = "Controls"
|
||||
margin_top = 127.0
|
||||
margin_right = 222.0
|
||||
margin_bottom = 186.0
|
||||
focus_neighbour_top = NodePath("../Continue")
|
||||
focus_neighbour_top = NodePath("../Controls")
|
||||
focus_neighbour_bottom = NodePath("../MainMenuButton")
|
||||
|
||||
[node name="MainMenuButton" parent="PauseOverlay/VBoxContainer" instance=ExtResource( 3 )]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user