Skip to content

Class "ColorParams"⚓︎

Info

可以通过其构造函数访问此类:

Example Code
1
local fiveSecondRedColor = ColorParams(Color(1,0,0,1),255,150,false,false)

Constructors⚓︎

ColorParams ()⚓︎

ColorParams ColorParams ( Color color, int priority, int duration1, int duration2, boolean fadeout, boolean shared )⚓︎


Functions⚓︎

GetColor ()⚓︎

Color GetColor ( )⚓︎


GetDuration ()⚓︎

int GetDuration ( )⚓︎

定义这些参数应持续的更新帧数。对剩余帧数没有影响,但如果启用了 Fadeout(淡出),则会影响淡出速度(计算方式为 Lifespan / Duration,即“寿命/持续时间”)。

GetFadeout ()⚓︎

boolean GetFadeout ( )⚓︎


GetLifespan ()⚓︎

int GetLifespan ( )⚓︎

定义在这些参数过期之前还剩下多少更新帧数。在每秒 30 次的非插值更新中,每次更新该值会减 1。更改此值将直接影响这些参数在过期前还剩下多少帧数。


GetPriority ()⚓︎

int GetPriority ( )⚓︎


GetShared ()⚓︎

boolean GetShared ( )⚓︎


SetColor ()⚓︎

void SetColor ( Color Color )⚓︎


SetDuration ()⚓︎

void SetDuration ( int Duration )⚓︎


SetFadeout ()⚓︎

void SetFadeout ( boolean Value )⚓︎


SetLifespan ()⚓︎

void SetLifespan ( int Duration )⚓︎


SetPriority ()⚓︎

void SetPriority ( int Priority )⚓︎


SetShared ()⚓︎

void SetShared ( boolean Value )⚓︎