C# Class DroneHunter, astrochimps

Implements the behaviour of an AI controlled hunter drone. From the Game Design Document: Capture monkeys (highest priority) Attack enemy saboteur drones (when they were revealed); Avoid enemy saboteur drones
Inheritance: MonoBehaviour
ファイルを表示 Open project: arcoelho01/astrochimps Class Usage Examples

Public Methods

Method Description
CheckRadiusForAgents ( ) : Transform

This method is called when there an enemy in our view. So, we must decide what is best: engage with this enemy, proceed with our current target, if any, etc.

DeliverPrisoner ( Transform tPrisonBuilding, CBaseEntity, entityPrisoner ) : void

Executes the delivery of the captured monkey to the prison building

GetLastTargetSightedPosition ( ) : Vector3

Returns the position where the drone last saw an enemy

GetNearestPrison ( ) : Transform

Private Methods

Method Description
Awake ( ) : void
CheckForEnemiesInView ( int enemyLayer, float fRadius ) : void

Check for any enemies inside the field of view of this drone

OnDrawGizmos ( ) : void

Draw some helpers on screen

PickClosestTargetFromTheList ( List ltCandidates ) : Transform

Receive a list of possibles targets and return which one is closest to this drone

Start ( ) : void
Update ( ) : void

Method Details

CheckRadiusForAgents() public method

This method is called when there an enemy in our view. So, we must decide what is best: engage with this enemy, proceed with our current target, if any, etc.
public CheckRadiusForAgents ( ) : Transform
return Transform

DeliverPrisoner() public method

Executes the delivery of the captured monkey to the prison building
public DeliverPrisoner ( Transform tPrisonBuilding, CBaseEntity, entityPrisoner ) : void
tPrisonBuilding Transform
entityPrisoner CBaseEntity,
return void

GetLastTargetSightedPosition() public method

Returns the position where the drone last saw an enemy
public GetLastTargetSightedPosition ( ) : Vector3
return Vector3

GetNearestPrison() public method

public GetNearestPrison ( ) : Transform
return Transform