Skip to content

Weather

namespace Griff.Scenes;
public sealed class Weather : Component, IDrawable

Rain, snow, falling leaves or rising embers all over the view, wherever the camera goes. Add it to any entity (Entity → Create Weather makes one); Order says what it falls in front of. In a dark scene it’s lit like everything else, so rain glints near a lantern. Tick Storm for lightning.

This is a component: its saved properties are on its component page.

public float Amount { get; set; }

How much of it there is, from 0 (none) to 1 (a downpour, a blizzard). Scripts can change it as it plays.

public WeatherKind Kind { get; set; }

Rain, snow, leaves or embers.

public int Order { get; set; }

Higher draws on top, like Order. The default falls in front of most things.

public float Speed { get; set; }

How fast it falls (or rises), times its usual speed.

public bool Storm { get; set; }

Lightning flashes the screen every few seconds, and ThunderSound rumbles a moment later.

public string? ThunderSound { get; set; }

Played a moment after each lightning flash, at a slightly different pitch each time.

public Color Tint { get; set; }

Multiplied into its colors: white keeps the usual look (blue-grey rain, white snow, autumn leaves, orange embers).

public float Wind { get; set; }

Sideways speed, in world units a second: positive blows right, negative left. Slants rain and drifts snow.