sonolus.script.bucket¶
Bucket
¶
Judgment
¶
Bases: IntEnum
The judgment of a hit.
JudgmentWindow
¶
Bases: Record
The window for judging the accuracy of a hit.
Usage
JudgmentWindow(perfect: Interval, great: Interval, good: Interval)
end
property
¶
The end time of the good interval.
good
instance-attribute
¶
Interval for a good hit.
great
instance-attribute
¶
Interval for a great hit.
perfect
instance-attribute
¶
Interval for a perfect hit.
start
property
¶
The start time of the good interval.
__add__(other)
¶
Add a scalar to the intervals.
__mul__(other)
¶
Multiply the intervals by a scalar.
judge(actual, target)
¶
update(perfect=None, great=None, good=None)
¶
bucket(*, sprites, unit=None)
¶
Define a bucket with the given sprites and unit.
bucket_sprite(*, sprite, fallback_sprite=None, x, y, w, h, rotation=0)
¶
Define a sprite for a bucket.
buckets(cls)
¶
Decorator to define a buckets class.
Usage
@buckets
class Buckets:
note: Bucket = bucket(
sprites=[
bucket_sprite(
sprite=Skin.note,
x=0,
y=0,
w=2,
h=2,
)
],
unit=StandardText.MILLISECOND_UNIT,
)