diff --git a/project.godot b/project.godot index af1a3f6..e6795c3 100644 --- a/project.godot +++ b/project.godot @@ -87,6 +87,12 @@ down={ , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) ] } +fullscreen={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194342,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null) +] +} [internationalization] diff --git a/scenes/Grid/grid.gd b/scenes/Grid/grid.gd index 050f0ef..36b0a03 100644 --- a/scenes/Grid/grid.gd +++ b/scenes/Grid/grid.gd @@ -29,6 +29,8 @@ func spawnBlock() -> void: fillNextBlocks() func _ready() -> void: + if GLOBAL.time <= 30: + get_tree().paused = true tickerTimer.start(blockSpeed) getNewPatterns() PlacePattern() diff --git a/scenes/Main/main.gd b/scenes/Main/main.gd index 38342f6..d9da935 100644 --- a/scenes/Main/main.gd +++ b/scenes/Main/main.gd @@ -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()