This commit is contained in:
Mark Hoekveen
2019-10-27 21:38:56 +01:00
parent a73b23575d
commit a05c72fc4a
6 changed files with 169 additions and 99 deletions
+14 -1
View File
@@ -13,8 +13,9 @@ func spawn_a_bitch():
add_child(c)
# Geef de bitch een random positie en rotatie
c.rotate_y(rand_range(-5, 5))
#c.rotate_y(rand_range(-5, 5))
c.transform = Transform(c.transform.basis, Vector3(rand_range(-7, 7), 0, rand_range(-5, 5)))
c.set_color()
return c
func kill_a_bitch():
@@ -36,6 +37,7 @@ func combine_a_bitch():
deselect_all()
select(new_child)
new_child.describe()
new_child.set_color()
func deselect_all():
for i in range(selected.size()):
@@ -49,6 +51,17 @@ func select(creature):
else:
selected.append(creature)
creature.get_node("SelectionIndicator").visible = true;
var p0 = get_node("../GUI/Parent0")
var p1 = get_node("../GUI/Parent1")
p0.text = ""
p1.text = ""
if selected.size() >= 1:
p0.text = selected[0].describe()
var copy0 = selected[0].duplicate()
copy0.get_node("AnimationPlayer").set_autoplay("Animation")
get_node("../GUI/Preview0/Viewport").add_child(copy0)
if selected.size() >= 2:
p1.text = selected[1].describe()
func select_a_bitch(camera, event, click_position, click_normal, index, creature_id):
if event.is_action_pressed("select_creature"):