aprilGame/scripts/game.gd

21 lines
544 B
GDScript

class_name game extends Node2D
signal destroySignal (body)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
get_window().grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func on_trigger(body: Variant, intentMessage: Variant) -> void:
if body.is_in_group("fragile") and intentMessage == "destroy":
destroySignal.emit(body)
func totalCube(NumberOfCube:int)->void:
print ("gameknowscubes: "+str(NumberOfCube))