countdown = {
    maxSize = 5,
    lastNumSound = "0",
}

function countdown:Draw(dt)
    UiPush()
        local countdownTime = GetFloat("level.countdown")
        local countdownStr  = tostring(math:Clamp(math.ceil(countdownTime), 1, 3))
        UiTranslate(UiCenter(), 420)
        UiAlign("center middle")
        UiFont("bold.ttf", 100)
        UiScale(1.8)
        UiTextShadow(0, 0, 0, 0.3, 2.0)
        UiText(countdownStr)
        if self.lastNumSound ~= countdownStr then
            self.lastNumSound = countdownStr
            UiSound("MOD/snd/ready.ogg")
        end
    UiPop()
end
