Skip to main content

CooldownBase

Base object for a cooldown. Provides calculation utilties.

Properties

Done

CooldownBase.Done: Signal<()>

Event that fires when the cooldown is done.

Functions

new

CooldownBase.new(
numberValueNumberValue,
serviceBagServiceBag
) → CooldownBase

Constructs a new Cooldown.

GetObject

CooldownBase:GetObject() → Instance

Gets the Roblox instance of the cooldown.

GetTimePassed

CooldownBase:GetTimePassed() → number?

Gets the time passed

GetTimeRemaining

CooldownBase:GetTimeRemaining() → number?

Gets the time remaining

GetEndTime

CooldownBase:GetEndTime() → number?

Gets the syncronized time stamp the cooldown is ending at

GetStartTime

CooldownBase:GetStartTime() → number?

Gets the syncronized time stamp the cooldown is starting at

GetLength

CooldownBase:GetLength() → number

Gets the length of the cooldown

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new Cooldown.",
            "params": [
                {
                    "name": "numberValue",
                    "desc": "",
                    "lua_type": "NumberValue"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CooldownBase"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetObject",
            "desc": "Gets the Roblox instance of the cooldown.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetTimePassed",
            "desc": "Gets the time passed",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 72,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetTimeRemaining",
            "desc": "Gets the time remaining",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 80,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetEndTime",
            "desc": "Gets the syncronized time stamp the cooldown is ending at",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 88,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetStartTime",
            "desc": "Gets the syncronized time stamp the cooldown is starting at",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 96,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        },
        {
            "name": "GetLength",
            "desc": "Gets the length of the cooldown",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 104,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Done",
            "desc": "Event that fires when the cooldown is done.",
            "lua_type": "Signal<()>",
            "source": {
                "line": 51,
                "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
            }
        }
    ],
    "types": [],
    "name": "CooldownBase",
    "desc": "Base object for a cooldown. Provides calculation utilties.",
    "source": {
        "line": 5,
        "path": "src/cooldown/src/Shared/Binders/CooldownBase.lua"
    }
}