mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
10 lines
275 B
GDScript
10 lines
275 B
GDScript
extends Spatial
|
|
|
|
# Random spawn of Rigidbody cubes.
|
|
func _on_SpawnTimer_timeout():
|
|
var new_rb = preload("res://cube_rigidbody.tscn").instance()
|
|
new_rb.translation.y = 15
|
|
new_rb.translation.x = rand_range(-5, 5)
|
|
new_rb.translation.z = rand_range(-5, 5)
|
|
add_child(new_rb)
|