2020-08-05 11:03:11 +02:00
|
|
|
extends Node
|
|
|
|
|
2021-02-13 13:44:18 +01:00
|
|
|
var TIME_TO_DELETE : float = 1.0
|
|
|
|
var time_to_delete : float = TIME_TO_DELETE
|
2020-11-07 17:36:23 +01:00
|
|
|
|
2021-02-13 13:44:18 +01:00
|
|
|
func _populate() -> void:
|
|
|
|
for _i in range(4):
|
2020-08-05 11:03:11 +02:00
|
|
|
add_child(AnimationPlayer.new())
|
|
|
|
add_child(AnimationTree.new())
|
|
|
|
add_child(AnimationTreePlayer.new())
|
|
|
|
add_child(AudioStreamPlayer.new())
|
|
|
|
add_child(CanvasLayer.new())
|
|
|
|
add_child(ParallaxBackground.new())
|
|
|
|
add_child(HTTPRequest.new())
|
|
|
|
add_child(ResourcePreloader.new())
|
|
|
|
add_child(Skeleton2D.new())
|
|
|
|
add_child(Timer.new())
|
|
|
|
add_child(Tween.new())
|
|
|
|
add_child(Viewport.new())
|
|
|
|
add_child(WorldEnvironment.new())
|
2021-02-13 13:44:18 +01:00
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
_populate()
|
|
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
|
|
time_to_delete -= delta
|
|
|
|
if time_to_delete < 0:
|
|
|
|
time_to_delete += TIME_TO_DELETE
|
|
|
|
|
|
|
|
for i in get_children():
|
|
|
|
i.queue_free()
|
|
|
|
|
|
|
|
_populate()
|