-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClickHandlers.lua
More file actions
38 lines (33 loc) · 1.03 KB
/
ClickHandlers.lua
File metadata and controls
38 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function endTurnClick(player)
if Debug.let_anyone_act or player.color == UMGame.whoseTurn().color then
UMGame.nextTurn()
broadcastToAll(UMGame.whoseTurn():getName() .. "'s turn starts now.",
UMGame.whoseTurn().color)
hideActionButtons()
PropertyUI.hide()
InGameObjects.gameboard.clearButtons()
for _, die in ipairs({InGameObjects.dice.normal1, InGameObjects.dice.normal2, InGameObjects.dice.speed}) do
die.setScale({1, 1, 1})
die.setLock(false)
die.interactable = true
end
end
end
function buyCurrentProperty(player)
UMGame.sellPropertyTo()
PropertyUI.hide()
UMGame.state = GameState.POST_MOVEMENT
createManagementBoardButtons(UMGame.whoseTurn())
end
function downgradeProperty(player)
UMGame.downgradeProperty()
end
function upgradeProperty()
UMGame.upgradeProperty()
end
function cancelImprovements()
UMGame.cancelImprovements()
end
function confirmImprovements()
UMGame.confirmImprovements()
end