static class Sky (client-side)
Available since version: 0.1.6
This class represents in game Sky.
Properties
int weather
Available since version: 0.1.10
Represents the sky weather. For more information see Weather constants.
bool raining
Available since version: 0.1.10
Represents the raining/snowing state.
bool renderLightning
Available since version: 0.1.10
Represents the lightning feature during raining state.
Lightning will only be rendered during raining and when weatherWeight is larger than 0.5
float windScale
Available since version: 0.1.10
Represents the sky wind scale used during raining/snowing.
float weatherWeight (read-only)
Available since version: 0.1.10
Represents the sky weather condition development in range 0.0 to 1.0.
When it starts raining/snowing this value gradually increases to 1.0.
When it stops raining/snowing this value gradually decreases back to near 0.0.
bool dontRain
Available since version: 0.1.10
Represents the sky dontRain feature.
When it's enabled, the rain/snow won't fall.
bool darkSky
Available since version: 0.1.10
Represents the dark sky feature. When it's enabled, the sun clouds are dark.
Methods
setRainStartTime
Available since version: 0.1.10
This method will set the sky weather time when it starts raining/snowing.
void setRainStartTime(int hour, int min)
Parameters:
inthour: the sky weather raining start hour.intmin: the sky weather raining start min.
getRainStartTime
Available since version: 0.1.10
This method will get the sky weather time when it starts raining/snowing.
{hour, min} getRainStartTime()
Returns {hour, min}:
the sky weather raining start time.
setRainStopTime
Available since version: 0.1.10
This method will set the sky weather time when it stops raining/snowing.
void setRainStopTime(int hour, int min)
Parameters:
inthour: the sky weather raining stop hour.intmin: the sky weather raining stop min.
getRainStopTime
Available since version: 0.1.10
This method will get the sky weather time when it stops raining/snowing.
{hour, min} getRainStopTime()
Returns {hour, min}:
the sky weather raining stop time.
setFogColor
This method will set the sky fog color day variation.
void setFogColor(int id, int r, int g, int b)
Parameters:
intid: the id of fog color day variation.intr: the red color component in RGB model.intg: the green color component in RGB model.intb: the blue color component in RGB model.
setCloudsColor
This method will set the sky clouds color.
void setCloudsColor(int r, int g, int b)
Parameters:
intr: the red color component in RGB model.intg: the green color component in RGB model.intb: the blue color component in RGB model.
setPlanetSize
This method will set the planet size ratio.
void setPlanetSize(int planetId, float size)
Parameters:
intplanetId: the planet id, for more information see Planet constants.floatsize: the size ratio.
setPlanetColor
This method will set the planet color.
void setPlanetColor(int planetId, int r, int g, int b, int a)
Parameters:
intplanetId: the planet id, for more information see Planet constants.intr: the red color component in RGBA model.intg: the green color component in RGBA model.intb: the blue color component in RGBA model.inta: the alpha color component in RGBA model.
setPlanetTxt
Available since version: 0.3.0
This method will set the planet texture.
void setPlanetTxt(int planetId, string texture)
Parameters:
intplanetId: the planet id, for more information see Planet constants.stringtexture: name.
setLightingColor
This method will set the sky lighting color.
void setLightingColor(int r, int g, int b)
Parameters:
intr: the red color component in RGB model.intg: the green color component in RGB model.intb: the blue color component in RGB model.
Callbacks
No callbacks.