Skip to content

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

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

setWeather

Deprecated since version: 0.1.10

This method will set the sky weather.

void setWeather(int weather)

Parameters:

  • int weather: the sky weather.

getWeather

Deprecated since version: 0.1.10

This method will get the sky weather.

int getWeather()

Returns int:

the sky weather.


setDontRain

Deprecated since version: 0.1.10

This method will enable/disable don't rain option for the sky.

void setDontRain(bool toggle)

Parameters:

  • bool toggle: true if you want to disable raining/snowing, otherwise false.

isDontRain

Deprecated since version: 0.1.10

This method will check if don't rain option is enabled for the sky.

bool isDontRain()

Returns bool:

true if raining/snowing is disabled, otherwise false.


setDarkSky

Deprecated since version: 0.1.10

This method will enable/disable dark sky feature.
When it's enabled, the sun clouds are dark.

void setDarkSky(bool toggle)

Parameters:

  • bool toggle: true if you want to enable dark sky, otherwise false.

isDarkSky

Deprecated since version: 0.1.10

This method will check if dark sky option is enabled.

bool isDarkSky()

Returns bool:

true if dark sky option is enabled, otherwise false.


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:

  • int hour: the sky weather raining start hour.
  • int min: 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:

  • int hour: the sky weather raining stop hour.
  • int min: 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.

void setFogColor(int r, int g, int b)

Parameters:

  • int r: the red color component in RGB model.
  • int g: the green color component in RGB model.
  • int b: 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:

  • int r: the red color component in RGB model.
  • int g: the green color component in RGB model.
  • int b: the blue color component in RGB model.

setPlanetSize

This method will set the planet size ratio.

void setPlanetSize(int planetId, float size)

Parameters:

  • int planetId: the planet id, for more information see Planet constants.
  • float size: the size ratio.

setPlanetColor

This method will set the planet color.

void setPlanetColor(int planetId, int r, int g, int b, int a)

Parameters:

  • int planetId: the planet id, for more information see Planet constants.
  • int r: the red color component in RGBA model.
  • int g: the green color component in RGBA model.
  • int b: the blue color component in RGBA model.
  • int a: the alpha color component in RGBA model.

setLightingColor

This method will set the sky lighting color.

void setLightingColor(int r, int g, int b)

Parameters:

  • int r: the red color component in RGB model.
  • int g: the green color component in RGB model.
  • int b: the blue color component in RGB model.