mirror of
https://github.com/Yadciel1/2048-Shooter.git
synced 2024-11-12 17:11:18 +01:00
21 lines
393 B
GDScript
21 lines
393 B
GDScript
extends Panel
|
|
|
|
var enemy_pre = preload("res://Entity.tscn")
|
|
var enemy = null
|
|
var Time = 0
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
if randi() % 2 == 0:
|
|
enemy = enemy_pre.instance()
|
|
add_child(enemy)
|
|
pass
|
|
|
|
func _process(delta):
|
|
Time += delta
|
|
if Time > 5:
|
|
if randi() % 2 == 0:
|
|
enemy = enemy_pre.instance()
|
|
add_child(enemy)
|
|
Time = 0
|