godot-psd-training/sceen/platform/platform.gd
2024-04-25 17:47:45 +08:00

13 lines
431 B
GDScript

extends Node3D
func _ready() -> void:
var screenDoor_scene = preload("res://sceen/platform/screenDoor.tscn")
for i in range(1, 5):
var screenDoorInstance = screenDoor_scene.instantiate()
add_child(screenDoorInstance)
screenDoorInstance.position.x=(i-1)*4.385
screenDoorInstance.name = 'screenDoor{0}'.format([i])
screenDoorInstance.connect("clickLcbSignalAndSent",Callable($LCB,"_on_screen_door_click_lcb_signal"))