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