|
@@ -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)
|