Files
recombinator/CreatureLab.gd
T
2019-10-21 03:16:34 +02:00

23 lines
463 B
GDScript

extends Node
export (PackedScene) var Creature
var selected;
func _ready():
pass
func spawn_a_bitch():
# Maak een bitch
var c = Creature.instance()
add_child(c)
# Geef de bitch een random positie en rotatie
c.rotate_y(rand_range(-5, 5))
c.transform = Transform(c.transform.basis, Vector3(rand_range(-7, 7), 0, rand_range(-5, 5)))
print_tree ( )
func kill_a_bitch():
var c = get_child(get_child_count()-1)
if c:
c.queue_free()
#remove_child(c)