-
Notifications
You must be signed in to change notification settings - Fork 0
API documentation
Christian Toney edited this page Mar 28, 2021
·
7 revisions
Stores a sound in the module.
-
sound
(instance) - A Sound instance stored in the module. -
keepKeys
(boolean) - If true, the keys defined by:SetKeys
or:AddKey
will not be removed. -
startStopwatchOnPlay
(boolean) - If true,:StartStopwatch
will be fired when thesound
is:Play()
'd
Adds a key to the table.
-
timePosition
(number) - A position in the sound -
index
(number, optional) - An index in the keys table to replace
Like :AddKey
, but bulk-adds keys to the table.
-
keys
(table) - A table of time positions
Example:
RhythmService:SetKeys({0.2, 1, 5})
Removes a key from the table
-
index
(number) - Index of the key
Enables a key. This method only works when the stopwatch is active.
-
disable
(boolean) - If true, the next key will be a priority. If there is no next key,:Stop stopwatch()
will fire. -
index
(number, optional) - The key in question. -
keepPosition
(boolean, optional) - If true, the current key will not shift.
Reactivates all keys.
Returns a table with accuracy data based on the current key.
The table includes the following keys:
-
Rating
(number) - A rating based on the tolerance level closest to the hit time. This isnil
if the hit time isn't in any tolerance range. -
GoalTime
(number) - The perfect time in seconds -
HitTime
(number) - The actual time in seconds
Stops the stopwatch.
Run :ResetKeys
and (re-)starts the stopwatch.
Fires when CheckRhythm() isn't called and a key passes while the stopwatch is active.