2023-06-14 22:17:55 +02:00
|
|
|
do
|
|
|
|
local VictoryDisplayApi = {}
|
|
|
|
|
|
|
|
-- triggers an update of the Victory count
|
|
|
|
---@param delay Number Delay in seconds after which the update call is executed
|
|
|
|
VictoryDisplayApi.update = function(delay)
|
2023-10-02 02:05:00 +02:00
|
|
|
local VictoryDisplay = getObjectsWithTag("VictoryDisplay")[1]
|
2023-09-29 13:41:43 +02:00
|
|
|
VictoryDisplay.call("startUpdate", delay)
|
2023-06-14 22:17:55 +02:00
|
|
|
end
|
|
|
|
|
2023-06-15 23:18:17 +02:00
|
|
|
-- moves a card to the victory display (in the first empty spot)
|
|
|
|
---@param object Object Object that should be checked and potentially moved
|
|
|
|
VictoryDisplayApi.placeCard = function(object)
|
|
|
|
if object ~= nil and object.tag == "Card" then
|
2023-10-02 02:05:00 +02:00
|
|
|
local VictoryDisplay = getObjectsWithTag("VictoryDisplay")[1]
|
2023-09-29 13:41:43 +02:00
|
|
|
VictoryDisplay.call("placeCard", object)
|
2023-06-15 23:18:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-06-14 22:17:55 +02:00
|
|
|
return VictoryDisplayApi
|
|
|
|
end
|