godot-psd-training/sceen/platform/platform.gd

13 lines
431 B
GDScript3
Raw Normal View History

2024-04-25 17:00:46 +08:00
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
2024-04-25 17:00:46 +08:00
screenDoorInstance.name = 'screenDoor{0}'.format([i])
screenDoorInstance.connect("clickLcbSignalAndSent",Callable($LCB,"_on_screen_door_click_lcb_signal"))