good progress very much playable

This commit is contained in:
Clevertop 2024-05-18 17:10:05 +10:00
parent 5381d72a5c
commit 24a59ad4ac
5 changed files with 69 additions and 35 deletions

View file

@ -12,10 +12,17 @@ extends Node3D
#Exported Variables
#@export_group("Group")
#@export_subgroup("Subgroup")
@export_group("Config")
@export var moveScale : float = 1
@export_group("Prefabs")
@export var block_scene : PackedScene
@export_group("Node References")
@export var blocks_node : Node3D
#Onready Variables
#Other Variables (please try to separate and organise!)
var current_block : RigidBody3D
#endregion
@ -30,14 +37,6 @@ func _process(delta):
#endregion
#region Signal methods
#endregion
#region Other methods (please try to separate and organise!)
#endregion
func _on_twitch_link_move_block(direction, amount):
var dir : Vector3
match direction:
@ -47,4 +46,27 @@ func _on_twitch_link_move_block(direction, amount):
"east" : dir = Vector3.RIGHT
"south" : dir = Vector3.BACK
"west" : dir = Vector3.LEFT
position += dir * amount
position += dir * amount * moveScale
func _on_twitch_link_drop_block():
current_block.freeze = false
current_block.reparent(blocks_node)
func _on_twitch_link_start_turn():
position = Vector3(0,3,0)
current_block = block_scene.instantiate()
current_block.freeze = true
add_child(current_block)
#endregion
#region Other methods (please try to separate and organise!)
#endregion