C# Class CDrone, astrochimps

Class with drones definitions
Inheritance: CBaseEntity
Afficher le fichier Open project: arcoelho01/astrochimps Class Usage Examples

Méthodes publiques

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
DestroyDrone ( ) : IEnumerator

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

Method Details

Attack() public méthode

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. ///
Résultat void

Attacked() public méthode

What to do when this drone is attacked?
public Attacked ( ) : void
Résultat void

Awake() public méthode

When the script is initialized
public Awake ( ) : void
Résultat void

Deselect() public méthode

public Deselect ( ) : void
Résultat void

DestroyThisDrone() public méthode

Actually destroy the drone game object
public DestroyThisDrone ( ) : void
Résultat void

EnterNewState() public méthode

Changes the FSM to a new state
public EnterNewState ( FSMState, eNewState ) : void
eNewState FSMState, The new state
Résultat void

ExecuteCurrentState() public méthode

Executes the FSM current state
public ExecuteCurrentState ( ) : void
Résultat void

FadeOutDrone() public méthode

Uses iTween to fade out the destroyed drone
public FadeOutDrone ( ) : void
Résultat void

GetColliderInfo() public méthode

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
Résultat void

GetCurrentState() public méthode

Returns the FSM current state
public GetCurrentState ( ) : FSMState,
Résultat FSMState,

LeaveCurrentState() public méthode

Leaves the current state. Used whenever the FSM enters a new state
public LeaveCurrentState ( ) : void
Résultat void

OnAStarReachedEndOfPath() public méthode

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

OnDestroy() public méthode

What to do when this object is destroyed
public OnDestroy ( ) : void
Résultat void

OnDisable() public méthode

What to do when this object is disabled
public OnDisable ( ) : void
Résultat void

OnEnable() public méthode

What to do when this object is enabled
public OnEnable ( ) : void
Résultat void

Patrolling() public méthode

public Patrolling ( ) : void
Résultat void

Recycled() public méthode

What to do when the drone is being recycled
public Recycled ( ) : void
Résultat void

Reprogrammed() public méthode

This drone has been reprogrammed, so it will change it's team
public Reprogrammed ( ) : void
Résultat void

Select() public méthode

Selected is override to play a sound
public Select ( ) : Transform
Résultat Transform

Update() public méthode

public Update ( ) : void
Résultat void

Waiting() public méthode

public Waiting ( ) : void
Résultat void

WalkTo() public méthode

public WalkTo ( Vector3 walkTo ) : void
walkTo Vector3
Résultat void

isStunned() public méthode

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

Property Details

AIScript public_oe property

public AstarAIFollow, AIScript
Résultat AstarAIFollow,

attackRange public_oe property

public float attackRange
Résultat float

droneType public_oe property

public eDroneType droneType
Résultat eDroneType

enemyPatrolScript public_oe property

public EnemyPatrol, enemyPatrolScript
Résultat EnemyPatrol,

hunterAIScript public_oe property

public DroneHunter, hunterAIScript
Résultat DroneHunter,

patrolDroneScript public_oe property

public DronePatrol, patrolDroneScript
Résultat DronePatrol,

patrolScript public_oe property

public Patrol, patrolScript
Résultat Patrol,

prefabSparks public_oe property

public Transform prefabSparks
Résultat Transform

saboteurScript public_oe property

public Saboteur, saboteurScript
Résultat Saboteur,

sfxAttacked public_oe property

public AudioClip,UnityEngine sfxAttacked
Résultat UnityEngine.AudioClip

sfxSelected public_oe property

public AudioClip,UnityEngine sfxSelected
Résultat UnityEngine.AudioClip

stunnedParticleSystem public_oe property

public Transform stunnedParticleSystem
Résultat Transform

transTarget public_oe property

public Transform transTarget
Résultat Transform

typeTarget public_oe property

public CBaseEntity.eObjType typeTarget
Résultat CBaseEntity.eObjType