Skip to content

Commit

Permalink
Changing the remove_icon function to pass in the icon
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Jun 14, 2024
1 parent 9b207cf commit 872dee2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Category3D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func clear_all():
for child in self.get_children():
child.queue_free()

func remove_icon(icon_index: int):
var icon = self.icons[icon_index]
func remove_icon(icon):
self.icons.remove(icon)
icon.queue_free()
2 changes: 1 addition & 1 deletion Spatial.gd
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D):
var category: Node = icon.get_parent()
var icon_index: int = category.icons.find(icon)
category.waypoint_category.get_icon().remove(icon_index)
category.category3d.remove_icon(icon_index)
category.category3d.remove_icon(icon)

func get_icon_position(waypoint_icon: Waypoint.Icon):
var position: Vector3
Expand Down

0 comments on commit 872dee2

Please sign in to comment.