Liquid tile.
More...
◆ DistanceToSurface()
float UnityPlatformer.Liquid.DistanceToSurface |
( |
Character |
character, |
|
|
float |
offset |
|
) |
| |
|
inline |
Get the distance between liquid surface and character(feet) + offset
◆ GetTop()
virtual Vector3 UnityPlatformer.Liquid.GetTop |
( |
| ) |
|
|
inlinevirtual |
Get real-world-coordinates water top
◆ IsBelowSurface()
bool UnityPlatformer.Liquid.IsBelowSurface |
( |
Character |
character, |
|
|
float |
offset |
|
) |
| |
|
inline |
Return if given character(feet) + offset is below liquid surface
◆ IsSubmerged()
bool UnityPlatformer.Liquid.IsSubmerged |
( |
Character |
character | ) |
|
|
inline |
Return if given character is complety submerged
◆ OnTriggerEnter2D()
virtual void UnityPlatformer.Liquid.OnTriggerEnter2D |
( |
Collider2D |
o | ) |
|
|
inlinevirtual |
if a Hitbox(EnterAreas) enter -> enterArea
◆ OnTriggerExit2D()
virtual void UnityPlatformer.Liquid.OnTriggerExit2D |
( |
Collider2D |
o | ) |
|
|
inlinevirtual |
if a Hitbox(EnterAreas) enter -> exitArea
◆ Start()
override void UnityPlatformer.Liquid.Start |
( |
| ) |
|
|
inlinevirtual |
◆ buoyancy
Vector2 UnityPlatformer.Liquid.buoyancy = Vector2.zero |
Velocity applied to the Character NOTE need to oppose gravity, so greater in other direction
◆ buoyancySurfaceFactor
float UnityPlatformer.Liquid.buoyancySurfaceFactor = 0.5f |
How much buoyancy apply when close to surface
◆ surfaceOffset
float UnityPlatformer.Liquid.surfaceOffset = 0 |
Surface offset, used to adjust how much the character can submerge.
◆ viscosity
float UnityPlatformer.Liquid.viscosity = 1 |
The documentation for this class was generated from the following file:
- Assets/UnityPlatformer/Scripts/Tiles/Liquid.cs