Refactor multi-resource UI and transfers
This commit is contained in:
parent
af5e08e5a1
commit
8231e165ff
20 changed files with 648 additions and 435 deletions
|
|
@ -20,10 +20,22 @@ var transitioning: bool = false
|
|||
func _ready() -> void:
|
||||
if GameState.planet_type == "gas_giant":
|
||||
# A gas giant is not lunar terrain: its surface view uses a deep,
|
||||
# coloured atmosphere instead of the rocky field.
|
||||
# coloured atmosphere instead of the rocky field. The background is
|
||||
# shader-driven, so changing ColorRect.color does not tint it; update
|
||||
# the actual palette uniforms.
|
||||
get_node("../RockField").visible = false
|
||||
get_node("../GasVentField").visible = true
|
||||
get_node("../BackgroundLayer/LunarBackground").color = Color(0.16, 0.035, 0.26, 1.0)
|
||||
var background: ColorRect = get_node("../BackgroundLayer/LunarBackground")
|
||||
var atmosphere: ShaderMaterial = background.material
|
||||
atmosphere.set_shader_parameter("base_color", Color(0.13, 0.025, 0.22, 1.0))
|
||||
atmosphere.set_shader_parameter("crater_color", Color(0.055, 0.008, 0.11, 1.0))
|
||||
atmosphere.set_shader_parameter("highlight_color", Color(0.52, 0.17, 0.7, 1.0))
|
||||
# The lunar surface uses dark captions on a bright ground. Flip only
|
||||
# those captions for the night-dark gas atmosphere.
|
||||
for caption_path in ["../UI/BankCaption", "../UI/FleetCaption"]:
|
||||
var caption: Label = get_node(caption_path)
|
||||
caption.add_theme_color_override("font_color", Color(0.78, 0.88, 0.94))
|
||||
caption.add_theme_color_override("font_outline_color", Color(0.02, 0.01, 0.05, 0.9))
|
||||
fleet.spawn_ships(GameState.surviving_ship_count, Vector2.ZERO)
|
||||
camera.position = Vector2.ZERO
|
||||
camera.zoom = Vector2(GameState.return_camera_zoom, GameState.return_camera_zoom)
|
||||
|
|
|
|||
Loading…
Reference in a new issue