C# 클래스 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
상속: MonoBehaviour
파일 보기 프로젝트 열기: arcoelho01/astrochimps 1 사용 예제들

공개 메소드들

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

비공개 메소드들

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

메소드 상세

CheckRadiusForAgents() 공개 메소드

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

DeliverPrisoner() 공개 메소드

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

GetLastTargetSightedPosition() 공개 메소드

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

GetNearestPrison() 공개 메소드

public GetNearestPrison ( ) : Transform
리턴 Transform