C# 클래스 EnemyBase, Corsair

상속: MonoBehaviour
파일 보기 프로젝트 열기: Final-Parsec/Corsair 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
baseHealth int
baseMoneyValue int
damageValue int
healthBarSize Vector2

보호된 프로퍼티들

프로퍼티 타입 설명
animator Animator
debuffs List
health int

공개 메소드들

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

보호된 메소드들

메소드 설명
AgentChangedNodes ( ) : void

Is called when the Agnet changes Nodes.

AgentReachedDestination ( ) : void

Is called when the Agnet reaches the destination.

InitAttributes ( ) : void

Initializes the attributes.

비공개 메소드들

메소드 설명
StartOrUpdateCoroutine ( StatusEffects enemyState, float duration ) : void

A helper method that updates or starts the Flash coroutine.

메소드 상세

AgentChangedNodes() 보호된 메소드

Is called when the Agnet changes Nodes.
protected AgentChangedNodes ( ) : void
리턴 void

AgentReachedDestination() 보호된 메소드

Is called when the Agnet reaches the destination.
protected AgentReachedDestination ( ) : void
리턴 void

ApplyDebuffs() 공개 메소드

Applies the debuffs to the EnemyBase
public ApplyDebuffs ( ) : void
리턴 void

Damage() 공개 메소드

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

DamageOverTime() 공개 메소드

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.
리턴 void

DestroyThis() 공개 메소드

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
리턴 IEnumerator

DirectDamage() 공개 메소드

Doesn't take armor into acount.
public DirectDamage ( int damage ) : void
damage int Damage to inclict.
리턴 void

InitAttributes() 보호된 메소드

Initializes the attributes.
protected InitAttributes ( ) : void
리턴 void

OnEnable() 공개 메소드

Called when object is enabled.
public OnEnable ( ) : void
리턴 void

ReduceArmor() 공개 메소드

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

ReverseDirection() 공개 메소드

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

Slow() 공개 메소드

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.
리턴 void

Update() 공개 메소드

Called once per frame.
public Update ( ) : void
리턴 void

프로퍼티 상세

animator 보호되어 있는 프로퍼티

A reference to the Animator component.
protected Animator animator
리턴 Animator

baseHealth 공개적으로 프로퍼티

The max posible health of the EnemyBase.
public int baseHealth
리턴 int

baseMoneyValue 공개적으로 프로퍼티

The money gained by the player before adjusting for wave count and difficulty.
public int baseMoneyValue
리턴 int

damageValue 공개적으로 프로퍼티

The damage done to the player.
public int damageValue
리턴 int

debuffs 보호되어 있는 프로퍼티

A list of Debuffs that are effecting the EnemyBase.
protected List debuffs
리턴 List

health 보호되어 있는 프로퍼티

The current health of the EnemyBase.
protected int health
리턴 int

healthBarSize 공개적으로 프로퍼티

The size of the healthbar.
public Vector2 healthBarSize
리턴 Vector2