Skip to main content

CooldownModel

Functions

new

CooldownModel.new() → CooldownModel

Creates a new cooldown model

isCooldownModel

CooldownModel.isCooldownModel(valueany) → boolean

Returns true if the value is a CooldownModel

SetClock

CooldownModel.SetClock(
clockClock
) → () → ()

Sets the clock to use for the cooldown

SetStartTime

CooldownModel.SetStartTime(
startTimenumber
) → () → ()

Sets the start time for the cooldown

SetLength

CooldownModel.SetLength(
lengthnumber
) → () → ()

Sets the length of the cooldown

GetStartTime

CooldownModel.GetStartTime(selfCooldownModel) → number

Gets the syncronized time stamp the cooldown is starting at

GetTimeRemaining

CooldownModel.GetTimeRemaining(selfCooldownModel) → number

Gets the time remaining

GetTimePassed

CooldownModel.GetTimePassed(selfCooldownModel) → number

Gets the time passed

GetEndTime

CooldownModel.GetEndTime(selfCooldownModel) → number?

Gets the syncronized time stamp the cooldown is ending at

GetLength

CooldownModel.GetLength(selfCooldownModel) → number

Gets the length of the cooldown

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a new cooldown model",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "isCooldownModel",
            "desc": "Returns true if the value is a CooldownModel",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 84,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "SetClock",
            "desc": "Sets the clock to use for the cooldown",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                },
                {
                    "name": "clock",
                    "desc": "",
                    "lua_type": "Clock"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "() -> ()\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 92,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "SetStartTime",
            "desc": "Sets the start time for the cooldown",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                },
                {
                    "name": "startTime",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "() -> ()\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 104,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "SetLength",
            "desc": "Sets the length of the cooldown",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                },
                {
                    "name": "length",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "() -> ()\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 116,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "GetStartTime",
            "desc": "Gets the syncronized time stamp the cooldown is starting at",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 128,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "GetTimeRemaining",
            "desc": "Gets the time remaining",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 136,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "GetTimePassed",
            "desc": "Gets the time passed",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 146,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "GetEndTime",
            "desc": "Gets the syncronized time stamp the cooldown is ending at",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 155,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        },
        {
            "name": "GetLength",
            "desc": "Gets the length of the cooldown",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "CooldownModel"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 163,
                "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CooldownModel",
    "desc": "",
    "source": {
        "line": 5,
        "path": "src/cooldown/src/Shared/Model/CooldownModel.lua"
    }
}