Fixed Bugs
This commit is contained in:
parent
08ae4632d4
commit
f7d00a3381
5 changed files with 12 additions and 18 deletions
|
|
@ -28,7 +28,7 @@ var lastUID = 1
|
|||
|
||||
var currentUID = lastUID
|
||||
|
||||
var time = 60
|
||||
var time = 120
|
||||
|
||||
var lost = false
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ func resetGame():
|
|||
points = 0
|
||||
lastUID = 0
|
||||
currentUID = lastUID
|
||||
time = 60
|
||||
time = 120
|
||||
lost = false
|
||||
|
||||
func _ready() -> void:
|
||||
|
|
|
|||
|
|
@ -285,11 +285,14 @@ func testRows():
|
|||
splitOphansUID(j.UID)
|
||||
if j.expand:
|
||||
GLOBAL.points += j.type * 2
|
||||
GLOBAL.time += j.type * 4
|
||||
GLOBAL.time += j.type
|
||||
elif not j.expand:
|
||||
GLOBAL.points += j.type
|
||||
GLOBAL.time += j.type * 2
|
||||
GLOBAL.time += j.type
|
||||
j.queue_free()
|
||||
for j in getBlockGroupsList():
|
||||
if j != GLOBAL.currentUID:
|
||||
if j != GLOBAL.currentUID:
|
||||
moveUidGroup(GLOBAL.Direction.BOTTOM, j)
|
||||
|
||||
func toggleButton():
|
||||
$Camera2D/CanvasLayer/Control.toggleButton()
|
||||
|
|
|
|||
|
|
@ -3,19 +3,13 @@ extends Control
|
|||
@onready var buttonContainer1 = $HBoxContainer3
|
||||
@onready var buttonContainer2 = $HBoxContainer4
|
||||
@onready var buttonContainer3 = $HBoxContainer5
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
print(DisplayServer.mouse_get_position() != Vector2i())
|
||||
if DisplayServer.mouse_get_position() == Vector2i():
|
||||
|
||||
func toggleButton():
|
||||
if DisplayServer.is_touchscreen_available():
|
||||
buttonContainer1.show()
|
||||
buttonContainer2.show()
|
||||
buttonContainer3.show()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_left_button_pressed() -> void:
|
||||
Input.action_press("left")
|
||||
Input.action_release("left")
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ func loadGrid():
|
|||
if $ScoreOverview != null:
|
||||
$ScoreOverview.queue_free()
|
||||
add_child(load("res://scenes/Grid/grid.tscn").instantiate())
|
||||
$Grid.toggleButton()
|
||||
|
||||
func scoreOverview():
|
||||
if $Grid != null:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue