Add planet scanner and octopus biome
This commit is contained in:
parent
2ecd61de98
commit
8fbcc340ce
21 changed files with 784 additions and 30 deletions
|
|
@ -58,7 +58,11 @@ func close_map() -> void:
|
|||
|
||||
|
||||
func recenter_view() -> void:
|
||||
var fleet_local: Vector2 = fleet.get_centroid() * content.WORLD_TO_LOCAL
|
||||
focus_world_position(fleet.get_centroid())
|
||||
|
||||
|
||||
func focus_world_position(world_position: Vector2) -> void:
|
||||
var fleet_local: Vector2 = world_position * content.WORLD_TO_LOCAL
|
||||
var viewport_center: Vector2 = get_viewport_rect().size / 2.0
|
||||
content.position = viewport_center - fleet_local * content.scale.x
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue