Class TWalkAttackCreature
Unit
CastleCreatures
Declaration
type TWalkAttackCreature = class(TCreature)
Description
Creature using TWalkAttackCreatureResource.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
HasLastSensedEnemy: boolean; |
Last known information about enemy.
|
Methods
 |
procedure SetLife(const Value: Single); override; |
|
 |
function Enemy: TAlive; virtual; |
Enemy of this creature. In this class, this always returns global World.Player (if it exists and is still alive). Return Nil for no enemy.
|
 |
procedure Attack; virtual; |
Actually do the attack indicated by AttackAnimation and AttackTime and other AttackXxx properties. This happens in the middle of AttackAnimation, at the time see AttackTime.
This can happen only if you defined AttackAnimation for this creature.
The default implementation here performs a short range attack , if enemy is still within reach (AttackMaxDistance; even if it was within reach at the start of csAttack state, the enemy could step back, so we need to check AttackMaxDistance again). The damage and knockback are defined by TCreatureResource.AttackDamageConst, TCreatureResource.AttackDamageRandom, TCreatureResource.AttackKnockbackDistance.
|
 |
procedure FireMissile; virtual; |
Actually do the attack indicated by FireMissileAnimation and FireMissileTime and other FireMissileXxx properties. This happens in the middle of FireMissileAnimation, at the time see FireMissileTime.
This can happen only if you defined FireMissileAnimation for this creature.
The default implementation here creates a new creature with resource defined by FireMissileName, if FireMissileName is not empty.
|
 |
constructor Create(AOwner: TComponent; const AMaxLife: Single); override; |
|
 |
destructor Destroy; override; |
|
 |
procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); override; |
|
 |
procedure Hurt(const LifeLoss: Single; const HurtDirection: TVector3; const AKnockbackDistance: Single; const Attacker: TAlive); override; |
|
Properties
 |
property StateChangeTime: Single read FStateChangeTime; |
Last State change time, taken from LifeTime.
|
Generated by PasDoc 0.15.0.
|