diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 09:26:14 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-15 09:26:14 +0200 |
commit | 29112c7cb534bddb7853fa9a34735bfde43839a1 (patch) | |
tree | 9529d224c6ac11f8a43640fb86a88b87180c0cd0 /Camera.gd | |
parent | 29b17954e10c68c082c2ccc8639476d176e498eb (diff) | |
download | godot-hexgrid-29112c7cb534bddb7853fa9a34735bfde43839a1.zip godot-hexgrid-29112c7cb534bddb7853fa9a34735bfde43839a1.tar.gz |
logic clean up
Diffstat (limited to 'Camera.gd')
-rw-r--r-- | Camera.gd | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) |