Add camera zoom
This commit is contained in:
@@ -3,21 +3,19 @@ extends Node2D
|
||||
|
||||
## Emitted when production progress changes (0.0 to 1.0)
|
||||
signal production_progress_updated(progress: float)
|
||||
|
||||
## Emitted when magic gold balance changes
|
||||
signal magic_gold_balance_updated(amount: BigNumber)
|
||||
|
||||
## Emitted when a production cycle completes
|
||||
signal production_completed(amount: BigNumber)
|
||||
|
||||
## Configuration data for this tower
|
||||
@export var data: AlchemyTowerData
|
||||
|
||||
## Available craft recipes
|
||||
@export var craft_recipes: AlchemyCraftCatalogue
|
||||
|
||||
## Reference to game state
|
||||
@onready var game_state: LevelGameState = find_parent("LevelGameState")
|
||||
@onready var _alchemy_currencies_panel: AlchemyCurrenciesPanel = $AlchemyCurrenciesPanel
|
||||
|
||||
## Current production state
|
||||
var production_time_elapsed: float = 0.0
|
||||
@@ -194,3 +192,11 @@ func _on_craft_requested(recipe: Variant) -> void:
|
||||
var success: bool = craft_item(recipe)
|
||||
if not success:
|
||||
push_warning("AlchemyTower: Failed to craft %s - insufficient funds" % recipe.output_currency.display_name)
|
||||
|
||||
|
||||
func _on_area_2d_mouse_entered() -> void:
|
||||
_alchemy_currencies_panel.visible = true
|
||||
|
||||
|
||||
func _on_area_2d_mouse_exited() -> void:
|
||||
_alchemy_currencies_panel.visible = false
|
||||
|
||||
@@ -25,9 +25,13 @@ position = Vector2(0.5, 11)
|
||||
shape = SubResource("RectangleShape2D_8pntr")
|
||||
|
||||
[node name="AlchemyCurrenciesPanel" parent="." unique_id=731368154 instance=ExtResource("2_8pntr")]
|
||||
visible = false
|
||||
offset_left = 65.0
|
||||
offset_top = -75.0
|
||||
offset_right = 65.0
|
||||
offset_bottom = -75.0
|
||||
currency = ExtResource("7_b8p5n")
|
||||
craft_recipes = ExtResource("5_recipes")
|
||||
|
||||
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="Area2D" to="." method="_on_area_2d_mouse_exited"]
|
||||
|
||||
@@ -90,5 +90,12 @@ position = Vector2(105, 920)
|
||||
position = Vector2(1239, 775)
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=1494908331]
|
||||
position = Vector2(5, 0)
|
||||
offset = Vector2(960, 540)
|
||||
script = ExtResource("17_x77df")
|
||||
clamp_enabled = true
|
||||
clamp_min = Vector2(-1920, -1080)
|
||||
clamp_max = Vector2(1920, 1080)
|
||||
zoom_sensitivity = null
|
||||
zoom_min = null
|
||||
zoom_max = null
|
||||
|
||||
Reference in New Issue
Block a user