Browse Source

:beetle: Fix shadowing of existing variable

scale is already an attribute of Node2D, so I renamed the argument of my
function.
DricomDragon 2 years ago
parent
commit
9ca1a0af89
1 changed files with 4 additions and 14 deletions
  1. 4 14
      godot/projector/focus/Focus.gd

+ 4 - 14
godot/projector/focus/Focus.gd

@@ -6,21 +6,11 @@ extends Camera2D
 signal ended
 
 
-# Called when the node enters the scene tree for the first time.
-func _ready():
-	pass # Replace with function body.
-
-
-# Called every frame. 'delta' is the elapsed time since the previous frame.
-func _process(delta):
-	pass
-
-
-func focus_on(pos: Vector2, scale: float) -> void:
+func focus_on(pos: Vector2, scope: float) -> void:
 	set_position(pos)
-	set_zoom(Vector2.ONE / scale)
+	set_zoom(Vector2.ONE / scope)
 	ended.emit()
 
 
-func _on_show_new_focus(pos: Vector2, scale: float) -> void:
-	focus_on(pos, scale)
+func _on_show_new_focus(pos: Vector2, scope: float) -> void:
+	focus_on(pos, scope)