-
Notifications
You must be signed in to change notification settings - Fork 1
/
LifeMeter.lua
62 lines (46 loc) · 1.74 KB
/
LifeMeter.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---@meta
---@diagnostic disable: redundant-parameter
---@class LifeMeter : ActorFrame
---@overload fun(self: LifeMeter): self
---@field [string] fun(self: LifeMeter)
LifeMeter = {}
--- Returns the amount of life left in the LifeMeter as a float in the range 0..1.
---@return number
function LifeMeter:GetLife() end
--- Returns `true` if failing.
---@return boolean
function LifeMeter:IsFailing() end
--- Returns `true` if the LifeMeter is "hot".
---@return boolean
function LifeMeter:IsHot() end
--- Returns `true` if in danger.
---@return boolean
function LifeMeter:IsInDanger() end
---@class LifeMeterBattery : LifeMeter
---@overload fun(self: LifeMeterBattery): self
---@field [string] fun(self: LifeMeterBattery)
LifeMeterBattery = {}
--- Changes the player's life by `iNumLives`. (Negative values subtract lives.)
---@param iNumLives integer
function LifeMeterBattery:ChangeLives(iNumLives) end
--- Returns the number of lives remaining.
---@return integer
function LifeMeterBattery:GetLivesLeft() end
--- Returns the number of total lives.
---@return integer
function LifeMeterBattery:GetTotalLives() end
---@class LifeMeterTime : LifeMeter
---@overload fun(self: LifeMeterTime): self
---@field [string] fun(self: LifeMeterTime)
LifeMeterTime = {}
--- Substracts `delta` from the player's current time. (Insert the opposite to
--- increase its value.)
function LifeMeterTime:ChangeTime(delta) end
--- Returns the current life of the player from 0 to 1.
---@return integer
function LifeMeterTime:GetLife() end
--- Returns the seconds equivalent of GetLife, by reporting how time is left for the player.
---@return number
function LifeMeterTime:GetLifeSeconds() end
--- Sets the time left for the player by `value`.
function LifeMeterTime:SetLife(value) end