C# Class UnityPlatformer.Liquid

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: llafuente/unity-platformer

Méthodes publiques

Свойство Type Description
buoyancy UnityEngine.Vector2
buoyancySurfaceFactor float
surfaceOffset float
viscosity float

Méthodes publiques

Méthode Description
DistanceToSurface ( Character character, float offset ) : float

Get the distance between liquid surface and character(feet) + offset

GetTop ( ) : Vector3

Get real-world-coordinates water top

IsBelowSurface ( Character character, float offset ) : bool

Return if given character(feet) + offset is below liquid surface

IsSubmerged ( Character character ) : bool

Return if given character is complety submerged

OnTriggerEnter2D ( Collider2D o ) : void

if a Hitbox(EnterAreas) enter -> enterArea

OnTriggerExit2D ( Collider2D o ) : void

if a Hitbox(EnterAreas) enter -> exitArea

Start ( ) : void

Get BoxCollider2D

Private Methods

Méthode Description
OnDrawGizmos ( ) : void

Method Details

DistanceToSurface() public méthode

Get the distance between liquid surface and character(feet) + offset
public DistanceToSurface ( Character character, float offset ) : float
character Character
offset float
Résultat float

GetTop() public méthode

Get real-world-coordinates water top
public GetTop ( ) : Vector3
Résultat UnityEngine.Vector3

IsBelowSurface() public méthode

Return if given character(feet) + offset is below liquid surface
public IsBelowSurface ( Character character, float offset ) : bool
character Character
offset float
Résultat bool

IsSubmerged() public méthode

Return if given character is complety submerged
public IsSubmerged ( Character character ) : bool
character Character
Résultat bool

OnTriggerEnter2D() public méthode

if a Hitbox(EnterAreas) enter -> enterArea
public OnTriggerEnter2D ( Collider2D o ) : void
o UnityEngine.Collider2D
Résultat void

OnTriggerExit2D() public méthode

if a Hitbox(EnterAreas) enter -> exitArea
public OnTriggerExit2D ( Collider2D o ) : void
o UnityEngine.Collider2D
Résultat void

Start() public méthode

Get BoxCollider2D
public Start ( ) : void
Résultat void

Property Details

buoyancy public_oe property

Velocity applied to the Character NOTE need to oppose gravity, so greater in other direction
public Vector2,UnityEngine buoyancy
Résultat UnityEngine.Vector2

buoyancySurfaceFactor public_oe property

public float buoyancySurfaceFactor
Résultat float

surfaceOffset public_oe property

Surface offset, used to adjust how much the character can submerge.
public float surfaceOffset
Résultat float

viscosity public_oe property

Viscosity affect Character Liquid movement
public float viscosity
Résultat float