16 lines
404 B
GDScript3
16 lines
404 B
GDScript3
|
|
class_name Model extends Node2D
|
||
|
|
|
||
|
|
const PERIOD: int = 300
|
||
|
|
var CURRENT_TIME: int = 0
|
||
|
|
|
||
|
|
func _ready():
|
||
|
|
pass # Replace with function body.
|
||
|
|
|
||
|
|
func _process(delta: float):
|
||
|
|
CURRENT_TIME += delta * 100
|
||
|
|
if CURRENT_TIME % 100 == 0:
|
||
|
|
print("Current time: ", str(CURRENT_TIME))
|
||
|
|
var droplet = preload("res://scenes/droplet.tscn").instantiate()
|
||
|
|
droplet.global_position = Vector2(100, 100)
|
||
|
|
add_child(droplet)
|