Minor cleanup
parent
3e06edc42a
commit
6661c3073d
|
@ -240,6 +240,7 @@ align = 2
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="IslandMap" type="TextureRect" parent="World/UI"]
|
[node name="IslandMap" type="TextureRect" parent="World/UI"]
|
||||||
|
visible = false
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
expand = true
|
expand = true
|
||||||
|
|
|
@ -64,8 +64,9 @@ func _ready():
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if Editor == null or not Editor.is_active():
|
if is_editor_active():
|
||||||
WorldCamera.offset = PlayerChar.position
|
WorldCamera.offset = PlayerChar.position
|
||||||
|
WorldCamera.zoom = birdy_spring_x
|
||||||
|
|
||||||
if len(player_navigation_path) > 1:
|
if len(player_navigation_path) > 1:
|
||||||
var player_coord = Globals.WorldToHexCenter(PlayerChar.transform.origin)
|
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)
|
var res = birdy_spring.calc(birdy_spring_x, birdy_spring_v, birdy_spring_xt, delta)
|
||||||
birdy_spring_x = res[0]
|
birdy_spring_x = res[0]
|
||||||
birdy_spring_v = res[1]
|
birdy_spring_v = res[1]
|
||||||
WorldCamera.zoom = birdy_spring_x
|
|
||||||
|
|
||||||
if BirdyTimer.time_left == 0:
|
if BirdyTimer.time_left == 0:
|
||||||
birdy_spring_xt = Vector2.ONE
|
birdy_spring_xt = Vector2.ONE
|
||||||
|
@ -137,6 +137,9 @@ func add_island_at(file_name, offset_world: Vector2):
|
||||||
Islands.add_child(island)
|
Islands.add_child(island)
|
||||||
|
|
||||||
|
|
||||||
|
func is_editor_active():
|
||||||
|
return Editor == null or not Editor.is_active()
|
||||||
|
|
||||||
func check_island_location_valid(new_island):
|
func check_island_location_valid(new_island):
|
||||||
var grid_origin_world_coord = Globals.HexToWorld(Vector2(0,0))
|
var grid_origin_world_coord = Globals.HexToWorld(Vector2(0,0))
|
||||||
if new_island.get_tile_by_world_coord(grid_origin_world_coord) != null:
|
if new_island.get_tile_by_world_coord(grid_origin_world_coord) != null:
|
||||||
|
|
Loading…
Reference in New Issue