ExecutePXS
Kategorie: Landschaft
Ab Engineversion: 8.0 OC
Beschreibung
Advances PXS (flying material pixels) by the specified amount of frames. This is meant for rainy or snowy scenarios to start with a screen full of precipitation.
Syntax
bool ExecutePXS(int frames, proplist callback);
Parameter
- frames:
How many frames to execute
- callback:
[opt]
For each executed frame, call callback->Timer(i)
, 0 ≤ i < frames
Anmerkung
The callback
parameter is chosen to allow passing simple effects.
Beispiel
local snowfx = new Effect
{
Timer = func()
{
CastPXS("Snow", 2, 0, Random(LandscapeWidth()), 0, RandomX(90, 270));
}
};
func Initialize()
{
var fx = CreateEffect(snowfx, 1, 1);
ExecutePXS(100, fx);
}
Creates a snowing effect and executes it for 100 frames so that the game starts with a snowy screen.
Luchs, 2017-11