C# Class UnityPlatformer.Projectile

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

Méthodes publiques

Свойство Type Description
onDestroy System.Action
onImpact System.Action

Méthodes publiques

Méthode Description
Awake ( ) : void

When Object is Awake, it will be automatically disabled When Fired the projectile, will be cloned and enabled

Destroy ( ) : void

Destroy Projectile waiting destroyDelay if needed

Fire ( Vector3 position ) : Projectile

Clone the projectile, activate, add it to UpdateManager and return :)

LatePlatformerUpdate ( float delta ) : void

Do nothing use PlatformerUpdate instead

OnTriggerEnter2D ( Collider2D o ) : void

When collide with something, check the mask, then check if it's damageable, and Destroy

PlatformerUpdate ( float delta ) : void

Move projectile accordingly

Méthodes protégées

Méthode Description
_Destroy ( ) : void

Real destroy method

Method Details

Awake() public méthode

When Object is Awake, it will be automatically disabled When Fired the projectile, will be cloned and enabled
public Awake ( ) : void
Résultat void

Destroy() public méthode

Destroy Projectile waiting destroyDelay if needed
public Destroy ( ) : void
Résultat void

Fire() public méthode

Clone the projectile, activate, add it to UpdateManager and return :)
public Fire ( Vector3 position ) : Projectile
position Vector3
Résultat Projectile

LatePlatformerUpdate() public méthode

Do nothing use PlatformerUpdate instead
public LatePlatformerUpdate ( float delta ) : void
delta float
Résultat void

OnTriggerEnter2D() public méthode

When collide with something, check the mask, then check if it's damageable, and Destroy
public OnTriggerEnter2D ( Collider2D o ) : void
o UnityEngine.Collider2D
Résultat void

PlatformerUpdate() public méthode

Move projectile accordingly
public PlatformerUpdate ( float delta ) : void
delta float
Résultat void

_Destroy() protected méthode

Real destroy method
protected _Destroy ( ) : void
Résultat void

Property Details

onDestroy public_oe property

Callback when is destroyed
public Action,System onDestroy
Résultat System.Action

onImpact public_oe property

Callback when impact something
public Action,System onImpact
Résultat System.Action