|
|
|
@ -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: |
|
|
|
|