C# Class EnemyBase, Corsair

Inheritance: MonoBehaviour
Afficher le fichier Open project: Final-Parsec/Corsair Class Usage Examples

Méthodes publiques

Свойство Type Description
baseHealth int
baseMoneyValue int
damageValue int
healthBarSize Vector2

Protected Properties

Свойство Type Description
animator Animator
debuffs List
health int

Méthodes publiques

Méthode Description
ApplyDebuffs ( ) : void

Applies the debuffs to the EnemyBase

Damage ( int damage ) : void

Reduces the damage the enemy takes by it's armor.

DamageOverTime ( int damage, float duration, float interval, StatusEffects status ) : void

Damages the enemy over time. Updates a coroutine that flashes a color over the EnemyBase sprite.

DestroyThis ( ) : IEnumerator

Called when this objects time has come to an end. Spawns a death int with the money the user get, returns enemy to pool, and cleans up references.

DirectDamage ( int damage ) : void

Doesn't take armor into acount.

OnEnable ( ) : void

Called when object is enabled.

ReduceArmor ( int amount, float duration ) : void

Reduces the armor.

ReverseDirection ( float duration ) : void

Makes the enemy move backwards along it's path.

Slow ( float percentage, float duration ) : void

Slows the EnemyBase by a percentage.

Percentage is 0-1 not 0-100

Update ( ) : void

Called once per frame.

Méthodes protégées

Méthode Description
AgentChangedNodes ( ) : void

Is called when the Agnet changes Nodes.

AgentReachedDestination ( ) : void

Is called when the Agnet reaches the destination.

InitAttributes ( ) : void

Initializes the attributes.

Private Methods

Méthode Description
StartOrUpdateCoroutine ( StatusEffects enemyState, float duration ) : void

A helper method that updates or starts the Flash coroutine.

Method Details

AgentChangedNodes() protected méthode

Is called when the Agnet changes Nodes.
protected AgentChangedNodes ( ) : void
Résultat void

AgentReachedDestination() protected méthode

Is called when the Agnet reaches the destination.
protected AgentReachedDestination ( ) : void
Résultat void

ApplyDebuffs() public méthode

Applies the debuffs to the EnemyBase
public ApplyDebuffs ( ) : void
Résultat void

Damage() public méthode

Reduces the damage the enemy takes by it's armor.
public Damage ( int damage ) : void
damage int Damage inflicted before armor reduction.
Résultat void

DamageOverTime() public méthode

Damages the enemy over time. Updates a coroutine that flashes a color over the EnemyBase sprite.
public DamageOverTime ( int damage, float duration, float interval, StatusEffects status ) : void
damage int The total damage.
duration float Duration of effect.
interval float The interval to inflict damage.
status StatusEffects The status of the enemy.
Résultat void

DestroyThis() public méthode

Called when this objects time has come to an end. Spawns a death int with the money the user get, returns enemy to pool, and cleans up references.
public DestroyThis ( ) : IEnumerator
Résultat IEnumerator

DirectDamage() public méthode

Doesn't take armor into acount.
public DirectDamage ( int damage ) : void
damage int Damage to inclict.
Résultat void

InitAttributes() protected méthode

Initializes the attributes.
protected InitAttributes ( ) : void
Résultat void

OnEnable() public méthode

Called when object is enabled.
public OnEnable ( ) : void
Résultat void

ReduceArmor() public méthode

Reduces the armor.
public ReduceArmor ( int amount, float duration ) : void
amount int Amount to reduce.
duration float Duration of effect.
Résultat void

ReverseDirection() public méthode

Makes the enemy move backwards along it's path.
public ReverseDirection ( float duration ) : void
duration float Duration of effect.
Résultat void

Slow() public méthode

Slows the EnemyBase by a percentage.
Percentage is 0-1 not 0-100
public Slow ( float percentage, float duration ) : void
percentage float Percent to slow.
duration float Duration of effect.
Résultat void

Update() public méthode

Called once per frame.
public Update ( ) : void
Résultat void

Property Details

animator protected_oe property

A reference to the Animator component.
protected Animator animator
Résultat Animator

baseHealth public_oe property

The max posible health of the EnemyBase.
public int baseHealth
Résultat int

baseMoneyValue public_oe property

The money gained by the player before adjusting for wave count and difficulty.
public int baseMoneyValue
Résultat int

damageValue public_oe property

The damage done to the player.
public int damageValue
Résultat int

debuffs protected_oe property

A list of Debuffs that are effecting the EnemyBase.
protected List debuffs
Résultat List

health protected_oe property

The current health of the EnemyBase.
protected int health
Résultat int

healthBarSize public_oe property

The size of the healthbar.
public Vector2 healthBarSize
Résultat Vector2