Skip to main content

GlobalLiquidContainer

A class in Root.Township, Alta.Liquid.

Single scene liquid container used as a source and sink: liquid created from nothing is poured from it, and drunk or emptied liquid is poured into it. Get it with Instance.

Constructors​

MemberWhat it is
GlobalLiquidContainer()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private float receiveTransitionMultiplierBacking field for ReceiveTransitionMultiplier. Defaults to 0.5.

Properties​

MemberWhat it is
static GlobalLiquidContainer Instance { get; protected set; }The one global container.
override float ReceiveTransitionMultiplier { get; }How fast it takes in liquid from transitions.

Methods​

MemberWhat it is
static bool FillLiquidIntoContainer(LiquidContent liquidType, ILiquidContainer container, int amount, bool isForced = false)Pours an amount of the given liquid into a container. Used for spawning liquid.
static bool RemoveLiquidFromContainer(ILiquidContainer container, int amount, bool isForced = false)Pours an amount out of a container into the global one. Used for drinking and emptying.
protected override void Awake()Sets Instance, logging an error if one already exists.