summaryrefslogtreecommitdiffstats
path: root/Camera.gd
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-07-15 09:26:14 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-07-15 09:26:14 +0200
commit29112c7cb534bddb7853fa9a34735bfde43839a1 (patch)
tree9529d224c6ac11f8a43640fb86a88b87180c0cd0 /Camera.gd
parent29b17954e10c68c082c2ccc8639476d176e498eb (diff)
downloadgodot-hexgrid-29112c7cb534bddb7853fa9a34735bfde43839a1.zip
godot-hexgrid-29112c7cb534bddb7853fa9a34735bfde43839a1.tar.gz
logic clean up
Diffstat (limited to 'Camera.gd')
-rw-r--r--Camera.gd4
1 files changed, 2 insertions, 2 deletions
diff --git a/Camera.gd b/Camera.gd
index bb99330..694706e 100644
--- a/Camera.gd
+++ b/Camera.gd
@@ -8,9 +8,9 @@ var zoom_boundaries : Vector2
func _ready():
margin = Vector2(0, 0)
- #window = set within Main
-func on_configure(c : Vector2, ts : Vector2) -> void:
+func configure(w : Vector2, c : Vector2, ts : Vector2) -> void:
+ window = w
map_center = c
texture_size = ts
zoom_boundaries = Vector2(1.0, max((texture_size.x + margin.x) / window.x, (texture_size.y + margin.y) / window.y))