Skip to content

Commit

Permalink
Merge pull request godot-extended-libraries#28 from JarLowrey/patch-1
Browse files Browse the repository at this point in the history
Add erase_tail() method to Trail2D.
  • Loading branch information
willnationsdev authored Apr 16, 2019
2 parents e8ea2ad + 70468fa commit e7d6a1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/godot-next/2d/trail_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func _should_shrink() -> bool:

##### PUBLIC METHODS #####

func erase_trail():
for i in range(get_point_count()):
remove_point(0)

##### PRIVATE METHODS #####

##### SETTERS AND GETTERS #####
Expand All @@ -133,4 +137,4 @@ func set_target(p_value: Node2D):

func set_target_path(p_value: NodePath):
target_path = p_value
target = get_node(p_value) as Node2D if has_node(p_value) else null
target = get_node(p_value) as Node2D if has_node(p_value) else null

0 comments on commit e7d6a1e

Please sign in to comment.