Added mouse cursor hidding
This commit is contained in:
@@ -15,6 +15,8 @@ func _ready() -> void:
|
|||||||
pause_menu.hide()
|
pause_menu.hide()
|
||||||
game_over_menu.hide()
|
game_over_menu.hide()
|
||||||
|
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN
|
||||||
|
|
||||||
SoundManager.play_music_stream(SoundManager.music_stream_gameplay)
|
SoundManager.play_music_stream(SoundManager.music_stream_gameplay)
|
||||||
|
|
||||||
if player_falling_at_start:
|
if player_falling_at_start:
|
||||||
@@ -26,12 +28,14 @@ func _input(event: InputEvent) -> void:
|
|||||||
SoundManager.play_ui_stream(SoundManager.ui_stream_accept)
|
SoundManager.play_ui_stream(SoundManager.ui_stream_accept)
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
pause_menu.show()
|
pause_menu.show()
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
|
|
||||||
|
|
||||||
func _complete_level(player_position: Vector2) -> void:
|
func _complete_level(player_position: Vector2) -> void:
|
||||||
SoundManager.play_sfx_stream(SoundManager.sfx_stream_level_completed, player_position)
|
SoundManager.play_sfx_stream(SoundManager.sfx_stream_level_completed, player_position)
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
completion_menu.show()
|
completion_menu.show()
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
|
|
||||||
if SaveManager.completed_levels <= LevelManager.current_level_index:
|
if SaveManager.completed_levels <= LevelManager.current_level_index:
|
||||||
SaveManager.completed_levels = LevelManager.current_level_index + 1
|
SaveManager.completed_levels = LevelManager.current_level_index + 1
|
||||||
@@ -41,6 +45,7 @@ func _complete_level(player_position: Vector2) -> void:
|
|||||||
func _on_player_dead() -> void:
|
func _on_player_dead() -> void:
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
game_over_menu.show()
|
game_over_menu.show()
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
|
|
||||||
|
|
||||||
func _on_level_end_entered(body: Node2D) -> void:
|
func _on_level_end_entered(body: Node2D) -> void:
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ func _ready() -> void:
|
|||||||
if OS.get_name() == "Web":
|
if OS.get_name() == "Web":
|
||||||
_setup_for_web()
|
_setup_for_web()
|
||||||
|
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
|
|
||||||
SoundManager.play_music_stream(SoundManager.music_stream_main_menu)
|
SoundManager.play_music_stream(SoundManager.music_stream_main_menu)
|
||||||
|
|
||||||
start_button.grab_focus()
|
start_button.grab_focus()
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ func _on_continue_button_pressed() -> void:
|
|||||||
SoundManager.play_ui_stream(SoundManager.ui_stream_decline)
|
SoundManager.play_ui_stream(SoundManager.ui_stream_decline)
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
hide()
|
hide()
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_HIDDEN
|
||||||
|
|
||||||
|
|
||||||
func _on_main_menu_button_pressed() -> void:
|
func _on_main_menu_button_pressed() -> void:
|
||||||
|
|||||||
Reference in New Issue
Block a user