2015-04-06 16:49:58 +00:00
|
|
|
/**
|
|
|
|
Stars
|
|
|
|
Stars which are shown in the night sky.
|
|
|
|
*/
|
|
|
|
|
2012-10-29 23:10:00 +00:00
|
|
|
|
|
|
|
protected func Initialize()
|
|
|
|
{
|
2015-04-06 16:49:58 +00:00
|
|
|
var g = RandomX(1, 9);
|
|
|
|
if (g > 1)
|
|
|
|
SetGraphics(Format("%d", g));
|
|
|
|
|
|
|
|
var alpha = 0;
|
|
|
|
var time = FindObject(Find_ID(Environment_Time));
|
|
|
|
if (time && time->IsNight())
|
|
|
|
alpha = 255;
|
|
|
|
SetClrModulation(RGBa(255, 255, 255, alpha));
|
2012-10-29 23:10:00 +00:00
|
|
|
SetObjectBlitMode(GFX_BLIT_Additive);
|
2015-04-06 16:49:58 +00:00
|
|
|
|
2012-10-29 23:48:50 +00:00
|
|
|
var parallax = RandomX(8,12);
|
2015-04-06 16:49:58 +00:00
|
|
|
this.Parallaxity = [parallax, parallax];
|
|
|
|
return;
|
2012-10-29 23:10:00 +00:00
|
|
|
}
|
|
|
|
|
2015-04-06 16:49:58 +00:00
|
|
|
// Only appears during the night.
|
2012-10-29 23:10:00 +00:00
|
|
|
public func IsCelestial() { return true; }
|
|
|
|
|
2015-04-06 16:49:58 +00:00
|
|
|
// Not stored by itself because it's created by the time environment.
|
|
|
|
public func SaveScenarioObject() { return false; }
|