fix #115: when pause is resumed, it now only captures the mouse while player is on top of the focus stack.
This commit is contained in:
parent
f3a8ef6e46
commit
c9416492e3
|
|
@ -1,4 +1,4 @@
|
||||||
extends RigidBody3D
|
class_name Player extends RigidBody3D
|
||||||
|
|
||||||
var has_stage: bool = false:
|
var has_stage: bool = false:
|
||||||
set(on_stage):
|
set(on_stage):
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,9 @@ func toggle_pause_menu():
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
var state_machine = menu_animation["parameters/playback"]
|
var state_machine = menu_animation["parameters/playback"]
|
||||||
state_machine.travel("start_game")
|
state_machine.travel("start_game")
|
||||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
#FIXME: this may need a more generic implementation
|
||||||
|
if State.stage_list[0] is Player:
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||||
|
|
||||||
func debug_youth():
|
func debug_youth():
|
||||||
get_child(1).hide()
|
get_child(1).hide()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue