Added Fullscreen
This commit is contained in:
parent
65bf9e0c86
commit
5a6b18978e
3 changed files with 19 additions and 0 deletions
|
|
@ -29,6 +29,8 @@ func spawnBlock() -> void:
|
|||
fillNextBlocks()
|
||||
|
||||
func _ready() -> void:
|
||||
if GLOBAL.time <= 30:
|
||||
get_tree().paused = true
|
||||
tickerTimer.start(blockSpeed)
|
||||
getNewPatterns()
|
||||
PlacePattern()
|
||||
|
|
|
|||
|
|
@ -2,11 +2,22 @@ extends Node
|
|||
|
||||
@onready var scenes = $scenes
|
||||
|
||||
var fullscreen = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
|
||||
loadStartMenu()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if Input.is_action_just_pressed("fullscreen"):
|
||||
if not fullscreen:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
||||
fullscreen = true
|
||||
elif fullscreen:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
|
||||
fullscreen = false
|
||||
if scenes.get_children() != []:
|
||||
if GLOBAL.lost and scenes.get_child(0).name == "Grid":
|
||||
scoreOverview()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue