Table of Contents

Class RainSpoutEffects

Namespace
DFA.Puddlecraft

The look of a rain spout's water, built from layers that each suit a different strength of flow. A thin trickle is a glassy stream with a small crown splash; a heavy gush is a white, fanning, fraying stream wrapped in spray, with a churning splash, foam and mist where it lands. How heavily the spout pours (its outlet width times its speed times its current flow) decides which layers show and how strongly. The particles are sized to the outlet.

This component sits on the "Puddlecraft Spout Effects" prefab under a RainSpout. The stream is a lit ribbon that follows the arc the water takes at the spout's current pressure, so it throws further as the flow builds up. When there is too little water for a jet, the spout drips off its lip instead, drawn with the drip material.

Every other layer is a plain Particle System that can be restyled freely; this component only controls where, how often and how large they emit.

[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("Puddlecraft/Rain Spout Effects")]
[Icon("Packages/com.dfa.puddlecraft/editor/icons/spout.png")]
public sealed class RainSpoutEffects : MonoBehaviour
Inheritance
RainSpoutEffects

Properties

heaviness

How heavy the spout pours right now: 0 a thin trickle (or nothing), 1 a heavy gush.

public float heaviness { get; }

Property Value

float

spout

The spout these effects follow.

public RainSpout spout { get; }

Property Value

RainSpout

streamMaterial

Material for the stream ribbon.

public Material streamMaterial { get; set; }

Property Value

Material