1234567891011121314151617 |
- extends Spatial
- export var frequency = 0.3
- onready var timer = Timer.new()
- var boxscene = preload("res://TestBox.tscn")
- func _ready():
- timer.wait_time = 1.0/float(frequency)
- timer.connect("timeout",self,"spawn")
- add_child(timer)
- timer.start()
- spawn()
- func spawn():
- var box = boxscene.instance()
- add_child(box)
|