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
| Member | What it is |
|---|
GlobalLiquidContainer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private float receiveTransitionMultiplier | Backing field for ReceiveTransitionMultiplier. Defaults to 0.5. |
Properties
| Member | What 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
| Member | What 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. |