SCED/src/core/VictoryDisplayApi.ttslua
2023-09-29 13:41:43 +02:00

22 lines
816 B
Plaintext

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)
local VictoryDisplay = Global.call("getObjectFromMemo", {matColor = "Mythos", type = "VictoryDisplay"})
VictoryDisplay.call("startUpdate", delay)
end
-- 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
local VictoryDisplay = Global.call("getObjectFromMemo", {matColor = "Mythos", type = "VictoryDisplay"})
VictoryDisplay.call("placeCard", object)
end
end
return VictoryDisplayApi
end