This commit is contained in:
interfisch 2024-11-11 17:35:05 +01:00
parent 27effe4a70
commit cb2a440172

View file

@ -5,7 +5,6 @@ var point
var isSliding=false
var currentTrail:Line2D
#TODO: queue_free(), #clear_points()
const STARTALPHA=0.8
const MAXIMUM_POINTS=100 #maximum points per trail
@ -27,12 +26,7 @@ func _physics_process(delta: float) -> void:
c.queue_free()
func setSliding(psliding:bool):
if not isSliding and psliding: #just started sliding
#Reduce old lines
const KEEP_LINES=3
#if get_child_count()>KEEP_LINES:
# var trails=get_children()
if not isSliding and psliding: #just started sliding
#Create new Line
currentTrail=Line2D.new()
add_child(currentTrail)