C# 클래스 UnityPlatformer.CharacterHealth

Tracks character health and lives. Triggers character damage/death
상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: llafuente/unity-platformer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
alignment Alignment
onDamage System.Action
onDeath System.Action
onGameOver System.Action
onHeal System.Action
onHurt HurtCallback
onImmunity System.Action
onInjured HurtCallback
onInvulnerabilityEnd System.Action
onInvulnerabilityStart System.Action
onMaxHealth System.Action
onRespawn System.Action

공개 메소드들

메소드 설명
Damage ( int amount = 1, CharacterHealth causer = null ) : bool

Try to Damage the Character triggers onDamage triggers onDeath NOTE this won't trigger onHurtCharacter

Damage ( int amount, DamageType dt, CharacterHealth causer = null ) : bool

Try to Damage the Character

Damage ( Damage dmg ) : void

Try to Damage the Character

Die ( ) : void

Disable HitBox(es) and DamageType(s) Trigger onDeath

Heal ( int amount = 1 ) : void

increse health character if possible maxHealth not reached. Trigger onMaxHealth

IsInvulnerable ( ) : bool

Character is invulnerable?

Kill ( ) : void

Kill the character even if it's invulnerable

SetInvulnerable ( float time ) : void

Turns a character invulnerable, but still can be killed using Kill NOTE use float.MaxValue for unlimited time

SetVulnerable ( ) : void

disable invulnerability

Start ( ) : void

check missconfiguration and initialization

isDead ( ) : bool

No healt

메소드 상세

Damage() 공개 메소드

Try to Damage the Character triggers onDamage triggers onDeath NOTE this won't trigger onHurtCharacter
public Damage ( int amount = 1, CharacterHealth causer = null ) : bool
amount int
causer CharacterHealth
리턴 bool

Damage() 공개 메소드

Try to Damage the Character
public Damage ( int amount, DamageType dt, CharacterHealth causer = null ) : bool
amount int
dt DamageType
causer CharacterHealth
리턴 bool

Damage() 공개 메소드

Try to Damage the Character
public Damage ( Damage dmg ) : void
dmg Damage
리턴 void

Die() 공개 메소드

Disable HitBox(es) and DamageType(s) Trigger onDeath
public Die ( ) : void
리턴 void

Heal() 공개 메소드

increse health character if possible maxHealth not reached. Trigger onMaxHealth
public Heal ( int amount = 1 ) : void
amount int
리턴 void

IsInvulnerable() 공개 메소드

Character is invulnerable?
public IsInvulnerable ( ) : bool
리턴 bool

Kill() 공개 메소드

Kill the character even if it's invulnerable
public Kill ( ) : void
리턴 void

SetInvulnerable() 공개 메소드

Turns a character invulnerable, but still can be killed using Kill NOTE use float.MaxValue for unlimited time
public SetInvulnerable ( float time ) : void
time float
리턴 void

SetVulnerable() 공개 메소드

disable invulnerability
public SetVulnerable ( ) : void
리턴 void

Start() 공개 메소드

check missconfiguration and initialization
public Start ( ) : void
리턴 void

isDead() 공개 메소드

No healt
public isDead ( ) : bool
리턴 bool

프로퍼티 상세

alignment 공개적으로 프로퍼티

Character alignment
public Alignment alignment
리턴 Alignment

onDamage 공개적으로 프로퍼티

Fired when character is damaged. Will be fired even it the character is inmmune
public Action,System onDamage
리턴 System.Action

onDeath 공개적으로 프로퍼티

Play death animation, turn off the music... those sort of things
public Action,System onDeath
리턴 System.Action

onGameOver 공개적으로 프로퍼티

Credits...
public Action,System onGameOver
리턴 System.Action

onHeal 공개적으로 프로퍼티

Display some greenish starts floating around!
public Action,System onHeal
리턴 System.Action

onHurt 공개적으로 프로퍼티

This Character deal damage to other dt is the Damage dealed to is the CharacterHealth hurted
public HurtCallback onHurt
리턴 HurtCallback

onImmunity 공개적으로 프로퍼티

Fired after onDamage and Character is inmmune to given Damage
public Action,System onImmunity
리턴 System.Action

onInjured 공개적으로 프로퍼티

This Character health is reduced, will fire after onDamage dt is the Damage dealed to is the CharacterHealth that hurt me, if possible, could be null
public HurtCallback onInjured
리턴 HurtCallback

onInvulnerabilityEnd 공개적으로 프로퍼티

Stop that funky music!
public Action,System onInvulnerabilityEnd
리턴 System.Action

onInvulnerabilityStart 공개적으로 프로퍼티

Play that funky music! Quake-damage! NOTE this can be fired many times before onInvulnerabilityEnd
public Action,System onInvulnerabilityStart
리턴 System.Action

onMaxHealth 공개적으로 프로퍼티

Fired when Character heal and now it's at maxHealth
public Action,System onMaxHealth
리턴 System.Action

onRespawn 공개적으로 프로퍼티

After death when there are lives player can respawn
public Action,System onRespawn
리턴 System.Action