C# 클래스 UnityPlatformer.Liquid

상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: llafuente/unity-platformer

공개 프로퍼티들

프로퍼티 타입 설명
buoyancy UnityEngine.Vector2
buoyancySurfaceFactor float
surfaceOffset float
viscosity float

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
OnDrawGizmos ( ) : void

메소드 상세

DistanceToSurface() 공개 메소드

Get the distance between liquid surface and character(feet) + offset
public DistanceToSurface ( Character character, float offset ) : float
character Character
offset float
리턴 float

GetTop() 공개 메소드

Get real-world-coordinates water top
public GetTop ( ) : Vector3
리턴 UnityEngine.Vector3

IsBelowSurface() 공개 메소드

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

IsSubmerged() 공개 메소드

Return if given character is complety submerged
public IsSubmerged ( Character character ) : bool
character Character
리턴 bool

OnTriggerEnter2D() 공개 메소드

if a Hitbox(EnterAreas) enter -> enterArea
public OnTriggerEnter2D ( Collider2D o ) : void
o UnityEngine.Collider2D
리턴 void

OnTriggerExit2D() 공개 메소드

if a Hitbox(EnterAreas) enter -> exitArea
public OnTriggerExit2D ( Collider2D o ) : void
o UnityEngine.Collider2D
리턴 void

Start() 공개 메소드

Get BoxCollider2D
public Start ( ) : void
리턴 void

프로퍼티 상세

buoyancy 공개적으로 프로퍼티

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

buoyancySurfaceFactor 공개적으로 프로퍼티

public float buoyancySurfaceFactor
리턴 float

surfaceOffset 공개적으로 프로퍼티

Surface offset, used to adjust how much the character can submerge.
public float surfaceOffset
리턴 float

viscosity 공개적으로 프로퍼티

Viscosity affect Character Liquid movement
public float viscosity
리턴 float