From 78710c4445075b02c3bd5e150f3b17a03e7ce5bb Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Sat, 10 Dec 2022 04:53:09 +0100 Subject: [PATCH] 5 uhr --- scripts/Logic/Game.gd | 2 ++ scripts/Train.gd | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 scripts/Train.gd 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.