This commit is contained in:
2022-12-10 04:53:09 +01:00
parent 35d1bf72f3
commit 78710c4445
2 changed files with 19 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ var speed_p1 = 10
var speed_p2 = 10 var speed_p2 = 10
func _ready(): func _ready():
p1.get_node("root").test.connect(func(): print("player1"))
p2.get_node("root").test.connect(func(): print("player2"))
start_tween() start_tween()
func start_tween(): func start_tween():

17
scripts/Train.gd Normal file
View File

@@ -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.