Property | Type | Description | |
---|---|---|---|
isDead | System.Boolean |
Property | Type | Description | |
---|---|---|---|
Draw | void | ||
DrawHealthBar | void | ||
Move | void | ||
SetMoveToTarget | void | ||
isTargetDead | System.Boolean | ||
isUnitDead | System.Boolean |
Method | Description | |
---|---|---|
AttackBuilding ( Building enemyBuilding ) : void | ||
AttackUnit ( |
Sets the target to attack
|
|
CalculatePath ( Point p ) : CustomArrayList |
Calculates a path between the current unit and the point.
|
|
CheckCollision ( ) : void |
Repels other units that dare come close to our unit!
|
|
CheckForBuildingsInRange ( float rangeToCheck ) : void |
Updates the buildingsInRange variable, to contain all the buildings within the attack range of this unit.
|
|
CheckForEnemiesInRange ( float rangeToCheck ) : void |
Updates the enemiesInRange variable, to contain all the enemies within the attack range of this unit.
|
|
Defend ( |
Sets the target to defend
|
|
DefineDrawRectangle ( ) : |
Defines the rectangle/hitbox for the Unit. With draw offset
|
|
DefineRectangle ( ) : |
Defines the rectangle/hitbox for the Unit. without draw offset
|
|
Dispose ( ) : void |
Dispose of this unit.
|
|
GetCost ( |
Gets the cost of a unit
|
|
GetDrawRectangle ( ) : |
Gets the draw rectangle of this unit.
|
|
GetLocation ( ) : Point |
Gets a point location of this unit
|
|
MoveToNow ( Point p ) : void |
Feel free to use "\ <(*^_^*)> /"
|
|
MoveToQueue ( Point p ) : void |
Moves to a point in a while, by placing this unit and the point in a queue. When the time is there, process the pathfind This method is preferred to MoveToNow(Point p), as it doesn't cause a performance peek, but it may take a few frames before your path is ready.
|
|
OnAggro ( |
||
OnAggroRecieved ( |
||
OnCollisionChangedListener ( |
||
OnDamage ( |
||
SetAssaultLocation ( Point assaultPoint ) : void | ||
SetJob ( |
Set's the new Job for the unit
|
|
Swing ( Damageable target ) : void |
This unit will attempt to fire/swing/kill/cast!
|
|
TryToSwing ( ) : void | ||
Unit ( |
||
Update ( |
||
UpdateAttack ( ) : void | ||
UpdateDefense ( ) : void |
Method | Description | |
---|---|---|
UpdateMovement ( ) : void |
Updates the movement of this unit.
|
Method | Description | |
---|---|---|
Draw ( |
||
DrawHealthBar ( |
||
Move ( ) : void |
Updates the drawing position of this Unit.
|
|
SetMoveToTarget ( int x, int y ) : void |
Set the point this Unit has to move to. direction != direction is used for checking NaNExceptions.
|
|
isTargetDead ( ) : System.Boolean |
Checks to see wether the set target has died yet.
|
|
isUnitDead ( |
public AttackBuilding ( Building enemyBuilding ) : void | ||
enemyBuilding | Building | |
return | void |
public AttackUnit ( |
||
unitToAttack | ||
return | void |
public CalculatePath ( Point p ) : CustomArrayList |
||
p | Point | The point to calculate to. |
return | CustomArrayList |
public CheckForBuildingsInRange ( float rangeToCheck ) : void | ||
rangeToCheck | float | |
return | void |
public CheckForEnemiesInRange ( float rangeToCheck ) : void | ||
rangeToCheck | float | |
return | void |
public DefineDrawRectangle ( ) : |
||
return |
public DefineRectangle ( ) : |
||
return |
public static GetCost ( |
||
t | The unit type of which the cost is wanted | |
return | int |
public GetDrawRectangle ( ) : |
||
return |
public MoveToNow ( Point p ) : void | ||
p | Point | The point to move to |
return | void |
public MoveToQueue ( Point p ) : void | ||
p | Point | The point to move to, in a few frames depending on the queue |
return | void |
public abstract OnAggro ( |
||
e | ||
return | void |
public abstract OnAggroRecieved ( |
||
e | ||
return | void |
public OnCollisionChangedListener ( |
||
collisionEvent | ||
return | void |
public OnDamage ( |
||
e | ||
return | void |
public SetAssaultLocation ( Point assaultPoint ) : void | ||
assaultPoint | Point | |
return | void |
public abstract Swing ( Damageable target ) : void | ||
target | Damageable | |
return | void |
public Unit ( |
||
p | ||
x | int | |
y | int | |
movementSpeed | float | |
attackRange | float | |
aggroRange | float | |
rateOfFire | float | |
return | System |
public abstract Update ( |
||
ks | ||
ms | Microsoft.Xna.Framework.Input.MouseState | |
return | void |