master
potatoxel 7 months ago
parent 2d9334f1bf
commit 45fcb22536
  1. 6
      scenes/game/game.gd
  2. 1
      scenes/game/game.tscn

@ -78,7 +78,11 @@ func _on_Grid_tile_pressed(v):
if country.money >= 5 and tile.country == country and not tile.factory:
country.money -= 5
$Grid.set_factory(v, true)
"buy_army":
if country.money >= 3 and tile.country == country and tile.factory and len(tile.units) == 0:
country.money -= 3
country.add_unit({}, v)
func _input(event):
if event is InputEventMouseButton:
if event.pressed and event.button_index == BUTTON_RIGHT:

@ -17,6 +17,7 @@ margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
mouse_filter = 1
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control"]
anchor_left = 1.0

Loading…
Cancel
Save