A class in Root.Township, the global namespace.
Client: visuals for a potion bottle. Tints and shows the bubbling particles to match its liquid and sets up the splash when it breaks.
Constructors
| Member | What it is |
|---|
PotionVisuals() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Finds the liquid container, hooks its changes and the break spawner, and hides the bubbles. |
private void LiquidChanged(LiquidContent oldType, LiquidContent newType) | Shows and tints the bubbles and allows the break splash when there is liquid; hides them when empty. |
private void SetSplashParticlesContainer(PooledObject obj) | Links spawned splash particles to this container. |