nino... weiter

This commit is contained in:
Ententerminator committed 2020-02-01 16:25:50 +01:00
1 parent 9073fa0155
commit ffae145aa6
3 files changed
+21 -15

No files matched your search

-1
View File
@@ -66,7 +66,6 @@ collide_with_areas = true
collide_with_bodies = false
[node name="Torso" parent="." instance=ExtResource( 1 )]
[connection signal="pressed" from="GUI/HBoxC/VBoxC/Start" to="." method="_on_Button2_pressed"]
[editable path="Torso"]
+15 -10
View File
@@ -78,17 +78,24 @@ func _input(event):
if _viewport.get_viewport().get_mouse_position().x >= 0:
if event is InputEventMouseButton:
if event.pressed:
print("Mouse Click at: ", event.position)
_prev_mouse_pos = event.position
_viewRot = true
else:
print("mouse unpressed at: ", event.position)
_viewRot = false
func body_part_chosen(params):
var limb = _attachment_point.get_node("Limb")
if limb != null:
#no _attachment_point
if _attachment_point != null:
var limb = _attachment_point.get_node("Limb")
#adding only possible if no first child
#if limb.get_child(0) == null:
# limb.add_child(BodyPartLoader.bodyparts[params].instance())
#if spot already taken, DELETE
if limb.get_child(0) != null:
delete_body_part()
limb.add_child(BodyPartLoader.bodyparts[params].instance())
@@ -98,10 +105,8 @@ func make_it_shine(highlight : bool):
func delete_body_part():
var body_part = _attachment_point.get_node("Limb").get_child(0)
if body_part != null:
body_part.queue_free()
if _attachment_point != null:
var body_part = _attachment_point.get_node("Limb").get_child(0)
if body_part != null:
body_part.queue_free()