Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
This commit is contained in:
commit
c803198bfc
14 files changed
+89
-13
No files matched your search
@@ -87,13 +87,21 @@ func _input(event):
|
||||
_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())
|
||||
|
||||
|
||||
@@ -103,10 +111,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()
|
||||
|
||||
Reference in new issue
Block a user