diff --git a/scenes/Game.tscn b/scenes/Game.tscn index 1a584ef..4eb447b 100644 --- a/scenes/Game.tscn +++ b/scenes/Game.tscn @@ -240,6 +240,7 @@ align = 2 script = ExtResource( 4 ) [node name="IslandMap" type="TextureRect" parent="World/UI"] +visible = false anchor_right = 1.0 anchor_bottom = 1.0 expand = true diff --git a/scenes/World.gd b/scenes/World.gd index a82343d..d9bd312 100644 --- a/scenes/World.gd +++ b/scenes/World.gd @@ -64,8 +64,9 @@ func _ready(): func _process(delta): - if Editor == null or not Editor.is_active(): + if is_editor_active(): WorldCamera.offset = PlayerChar.position + WorldCamera.zoom = birdy_spring_x if len(player_navigation_path) > 1: var player_coord = Globals.WorldToHexCenter(PlayerChar.transform.origin) @@ -85,7 +86,6 @@ func _process(delta): var res = birdy_spring.calc(birdy_spring_x, birdy_spring_v, birdy_spring_xt, delta) birdy_spring_x = res[0] birdy_spring_v = res[1] - WorldCamera.zoom = birdy_spring_x if BirdyTimer.time_left == 0: birdy_spring_xt = Vector2.ONE @@ -137,6 +137,9 @@ func add_island_at(file_name, offset_world: Vector2): Islands.add_child(island) +func is_editor_active(): + return Editor == null or not Editor.is_active() + func check_island_location_valid(new_island): var grid_origin_world_coord = Globals.HexToWorld(Vector2(0,0)) if new_island.get_tile_by_world_coord(grid_origin_world_coord) != null: