Fix memory leak and save file deletion + other stuff
might also be the commit where timer starts only when you move
This commit is contained in:
parent
709ce8eea3
commit
edf99640cf
6 changed files with 45 additions and 57 deletions
|
@ -17,6 +17,7 @@ var rings: Array[Ring] = []
|
|||
|
||||
var finished_rings_count: int = 0
|
||||
var velocity: float = 0.0
|
||||
var has_started_playing: bool = false
|
||||
|
||||
func _init() -> void:
|
||||
assert(len(id) > 0, self.name + " has no id!")
|
||||
|
@ -69,7 +70,9 @@ func _input(_event: InputEvent) -> void:
|
|||
var down := Input.is_action_just_pressed("gravity_down")
|
||||
|
||||
if up or left or right or down:
|
||||
started_playing.emit()
|
||||
if !has_started_playing:
|
||||
has_started_playing = true
|
||||
started_playing.emit()
|
||||
PhysicsServer3D.area_set_param(
|
||||
get_viewport().find_world_3d().space,
|
||||
PhysicsServer3D.AREA_PARAM_GRAVITY,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue