diff --git a/scripts/Logic/Game.gd b/scripts/Logic/Game.gd index 76cdbfe..8cbfa98 100644 --- a/scripts/Logic/Game.gd +++ b/scripts/Logic/Game.gd @@ -15,6 +15,8 @@ var speed_p1 = 10 var speed_p2 = 10 func _ready(): + p1.get_node("root").test.connect(func(): print("player1")) + p2.get_node("root").test.connect(func(): print("player2")) start_tween() func start_tween(): diff --git a/scripts/Train.gd b/scripts/Train.gd new file mode 100644 index 0000000..ecd8c53 --- /dev/null +++ b/scripts/Train.gd @@ -0,0 +1,17 @@ +extends Node + +signal test + +var speed = 10 +var CANNONS = [] +var STORAGES = [] +#@onready var ENGINE = $Module/Engine + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + test.emit() # Replace with function body.