Fixed Bugs; Temporarily removed I-Block
This commit is contained in:
parent
ee5e17c3e0
commit
956b719e62
4 changed files with 27 additions and 11 deletions
|
|
@ -115,10 +115,18 @@ func turn(direction, newPosition):
|
|||
|
||||
|
||||
func getCollidingAreas():
|
||||
collision.force_update_transform()
|
||||
#collision.monitoring = false
|
||||
#collision.monitorable = false
|
||||
#await get_tree().process_frame
|
||||
#await get_tree().process_frame
|
||||
#collision.monitoring = true
|
||||
collision.monitorable = false
|
||||
await get_tree().process_frame
|
||||
collision.monitorable = true
|
||||
collision.monitorable = false
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
collision.monitorable = true
|
||||
var collidingAreas = []
|
||||
for i in collision.get_overlapping_areas():
|
||||
if i.is_in_group("Block"):
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const BLOCKSPATTERS : Dictionary = {
|
|||
"Z-Reverse": "res://scenes/Blocks/Patterns/Z-Reverse/Z-Reverse_block_pattern.tscn",
|
||||
"2x2": "res://scenes/Blocks/Patterns/2x2/2x2_block_pattern.tscn",
|
||||
"T": "res://scenes/Blocks/Patterns/T/T_block_pattern.tscn",
|
||||
"I": "res://scenes/Blocks/Patterns/I/I_block_pattern.tscn",
|
||||
#"I": "res://scenes/Blocks/Patterns/I/I_block_pattern.tscn",
|
||||
"1x3": "res://scenes/Blocks/Patterns/1x3/1x3_block_pattern.tscn"
|
||||
}
|
||||
enum Direction {BOTTOM, LEFT, RIGHT, TOP}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ func _physics_process(delta: float) -> void:
|
|||
currentPattern.turn(GLOBAL.Direction.RIGHT,i.position-spawnpoint.position + Vector2(GLOBAL.GRID/2, GLOBAL.GRID/2))
|
||||
#turnBlocks()
|
||||
if turnTickTimer.is_stopped():
|
||||
turnTickTimer.start(0.3)
|
||||
print(5*delta)
|
||||
turnTickTimer.start(9*delta)
|
||||
|
||||
|
||||
if Input.is_action_just_pressed("rotate_left") and not stopped:
|
||||
|
|
@ -62,7 +63,8 @@ func _physics_process(delta: float) -> void:
|
|||
currentPattern.turn(GLOBAL.Direction.LEFT,i.position-spawnpoint.position + Vector2(GLOBAL.GRID/2, GLOBAL.GRID/2))
|
||||
#turnBlocks()
|
||||
if turnTickTimer.is_stopped():
|
||||
turnTickTimer.start(0.3)
|
||||
print(5*delta)
|
||||
turnTickTimer.start(9*delta)
|
||||
|
||||
if Input.is_action_just_pressed("left"):
|
||||
moveUidGroup(GLOBAL.Direction.LEFT, GLOBAL.currentUID)
|
||||
|
|
@ -213,6 +215,11 @@ func _on_ticker_timeout() -> void:
|
|||
if await currentPattern.getCollidingBorder() == []:
|
||||
break
|
||||
currentPattern.position.x -= 64
|
||||
currentPattern.position.x = 0
|
||||
for i in range(1,8):
|
||||
if await currentPattern.getCollidingBorder() == []:
|
||||
break
|
||||
currentPattern.position.x += 64
|
||||
#if await currentPattern.getCollidingBorder() != []:
|
||||
#currentPattern.position.y += 64
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ grow_vertical = 2
|
|||
layout_mode = 1
|
||||
offset_left = 56.0
|
||||
offset_top = 64.0
|
||||
offset_right = 266.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = 152.0
|
||||
|
||||
[node name="Score" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer"]
|
||||
|
|
@ -54,21 +54,22 @@ layout_mode = 1
|
|||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -376.0
|
||||
offset_left = -312.0
|
||||
offset_top = 64.0
|
||||
offset_right = -128.0
|
||||
offset_right = -56.0
|
||||
offset_bottom = 152.0
|
||||
grow_horizontal = 0
|
||||
alignment = 2
|
||||
|
||||
[node name="Time" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
|
||||
[node name="TimeValue" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Time: "
|
||||
label_settings = ExtResource("3_jopb4")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="TimeValue" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
|
||||
[node name="Time" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = " :Time"
|
||||
label_settings = ExtResource("3_jopb4")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue