C# 클래스 CDrone, astrochimps

Class with drones definitions
상속: CBaseEntity
파일 보기 프로젝트 열기: arcoelho01/astrochimps 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AIScript AstarAIFollow,
attackRange float
droneType eDroneType
enemyPatrolScript EnemyPatrol,
hunterAIScript DroneHunter,
patrolDroneScript DronePatrol,
patrolScript Patrol,
prefabSparks Transform
saboteurScript Saboteur,
sfxAttacked UnityEngine.AudioClip
sfxSelected UnityEngine.AudioClip
stunnedParticleSystem Transform
transTarget Transform
typeTarget CBaseEntity.eObjType

공개 메소드들

메소드 설명
Attack ( Transform transTarget ) : void

Attack the specified transTarget. Considering all the tests we need to do it's probably best just to send the gameobject. Or not gotta discuss

Attacked ( ) : void

What to do when this drone is attacked?

Awake ( ) : void

When the script is initialized

Deselect ( ) : void
DestroyThisDrone ( ) : void

Actually destroy the drone game object

EnterNewState ( FSMState, eNewState ) : void

Changes the FSM to a new state

ExecuteCurrentState ( ) : void

Executes the FSM current state

FadeOutDrone ( ) : void

Uses iTween to fade out the destroyed drone

GetColliderInfo ( ) : void

Get info about the collider in this object. This is needed so we know what are the boundaries of the object. With this, we can calculate the distance of the object from others, knowing if we can attack them, for instance

GetCurrentState ( ) : FSMState,

Returns the FSM current state

LeaveCurrentState ( ) : void

Leaves the current state. Used whenever the FSM enters a new state

OnAStarReachedEndOfPath ( Transform eventRaiser, bool isMoving ) : void

This method is called when the Astar reaches the end of the path

OnDestroy ( ) : void

What to do when this object is destroyed

OnDisable ( ) : void

What to do when this object is disabled

OnEnable ( ) : void

What to do when this object is enabled

Patrolling ( ) : void
Recycled ( ) : void

What to do when the drone is being recycled

Reprogrammed ( ) : void

This drone has been reprogrammed, so it will change it's team

Select ( ) : Transform

Selected is override to play a sound

Update ( ) : void
Waiting ( ) : void
WalkTo ( Vector3 walkTo ) : void
isStunned ( ) : bool

Helper function to tell if a drone is in the STATE_STUNNED or no. Useful for monkeys attacking this drone

비공개 메소드들

메소드 설명
DestroyDrone ( ) : IEnumerator

Plays a final animation and, when it's over, destroy the drone object

메소드 상세

Attack() 공개 메소드

Attack the specified transTarget. Considering all the tests we need to do it's probably best just to send the gameobject. Or not gotta discuss
public Attack ( Transform transTarget ) : void
transTarget Transform /// Transform transTarget. ///
리턴 void

Attacked() 공개 메소드

What to do when this drone is attacked?
public Attacked ( ) : void
리턴 void

Awake() 공개 메소드

When the script is initialized
public Awake ( ) : void
리턴 void

Deselect() 공개 메소드

public Deselect ( ) : void
리턴 void

DestroyThisDrone() 공개 메소드

Actually destroy the drone game object
public DestroyThisDrone ( ) : void
리턴 void

EnterNewState() 공개 메소드

Changes the FSM to a new state
public EnterNewState ( FSMState, eNewState ) : void
eNewState FSMState, The new state
리턴 void

ExecuteCurrentState() 공개 메소드

Executes the FSM current state
public ExecuteCurrentState ( ) : void
리턴 void

FadeOutDrone() 공개 메소드

Uses iTween to fade out the destroyed drone
public FadeOutDrone ( ) : void
리턴 void

GetColliderInfo() 공개 메소드

Get info about the collider in this object. This is needed so we know what are the boundaries of the object. With this, we can calculate the distance of the object from others, knowing if we can attack them, for instance
public GetColliderInfo ( ) : void
리턴 void

GetCurrentState() 공개 메소드

Returns the FSM current state
public GetCurrentState ( ) : FSMState,
리턴 FSMState,

LeaveCurrentState() 공개 메소드

Leaves the current state. Used whenever the FSM enters a new state
public LeaveCurrentState ( ) : void
리턴 void

OnAStarReachedEndOfPath() 공개 메소드

This method is called when the Astar reaches the end of the path
public OnAStarReachedEndOfPath ( Transform eventRaiser, bool isMoving ) : void
eventRaiser Transform
isMoving bool
리턴 void

OnDestroy() 공개 메소드

What to do when this object is destroyed
public OnDestroy ( ) : void
리턴 void

OnDisable() 공개 메소드

What to do when this object is disabled
public OnDisable ( ) : void
리턴 void

OnEnable() 공개 메소드

What to do when this object is enabled
public OnEnable ( ) : void
리턴 void

Patrolling() 공개 메소드

public Patrolling ( ) : void
리턴 void

Recycled() 공개 메소드

What to do when the drone is being recycled
public Recycled ( ) : void
리턴 void

Reprogrammed() 공개 메소드

This drone has been reprogrammed, so it will change it's team
public Reprogrammed ( ) : void
리턴 void

Select() 공개 메소드

Selected is override to play a sound
public Select ( ) : Transform
리턴 Transform

Update() 공개 메소드

public Update ( ) : void
리턴 void

Waiting() 공개 메소드

public Waiting ( ) : void
리턴 void

WalkTo() 공개 메소드

public WalkTo ( Vector3 walkTo ) : void
walkTo Vector3
리턴 void

isStunned() 공개 메소드

Helper function to tell if a drone is in the STATE_STUNNED or no. Useful for monkeys attacking this drone
public isStunned ( ) : bool
리턴 bool

프로퍼티 상세

AIScript 공개적으로 프로퍼티

public AstarAIFollow, AIScript
리턴 AstarAIFollow,

attackRange 공개적으로 프로퍼티

public float attackRange
리턴 float

droneType 공개적으로 프로퍼티

public eDroneType droneType
리턴 eDroneType

enemyPatrolScript 공개적으로 프로퍼티

public EnemyPatrol, enemyPatrolScript
리턴 EnemyPatrol,

hunterAIScript 공개적으로 프로퍼티

public DroneHunter, hunterAIScript
리턴 DroneHunter,

patrolDroneScript 공개적으로 프로퍼티

public DronePatrol, patrolDroneScript
리턴 DronePatrol,

patrolScript 공개적으로 프로퍼티

public Patrol, patrolScript
리턴 Patrol,

prefabSparks 공개적으로 프로퍼티

public Transform prefabSparks
리턴 Transform

saboteurScript 공개적으로 프로퍼티

public Saboteur, saboteurScript
리턴 Saboteur,

sfxAttacked 공개적으로 프로퍼티

public AudioClip,UnityEngine sfxAttacked
리턴 UnityEngine.AudioClip

sfxSelected 공개적으로 프로퍼티

public AudioClip,UnityEngine sfxSelected
리턴 UnityEngine.AudioClip

stunnedParticleSystem 공개적으로 프로퍼티

public Transform stunnedParticleSystem
리턴 Transform

transTarget 공개적으로 프로퍼티

public Transform transTarget
리턴 Transform

typeTarget 공개적으로 프로퍼티

public CBaseEntity.eObjType typeTarget
리턴 CBaseEntity.eObjType