Property | Type | Description | |
---|---|---|---|
attackRange | float | ||
iconPrefab | Transform | ||
monkeyClass | eMonkeyType | ||
sfxAckAstronaut | |||
sfxAckCientist | |||
sfxAckDefault | |||
sfxAckEngineer | |||
sfxAckSaboteur | |||
sfxAttackAckAstronaut | |||
sfxAttackAckCientist | |||
sfxAttackAckEngineer | |||
sfxAttackAckSaboteur | |||
sfxAttackAstronaut | |||
sfxAttackCientist | |||
sfxAttackEngineer | |||
sfxAttackSaboteur | |||
sfxAttacked | |||
sfxAttackedAstronaut | |||
sfxAttackedCientist | |||
sfxAttackedEngineer | |||
sfxAttackedSaboteur | |||
sfxDying | |||
sfxReprogramming | |||
sfxResearchComplete | |||
sfxSelectedAstronaut | |||
sfxSelectedCientist | |||
sfxSelectedDefault | |||
sfxSelectedEngineer | |||
sfxSelectedIdle | |||
sfxSelectedSaboteur | |||
stepDustPrefab | Transform | ||
workingMouseState | MouseWorldPosition.eMouseStates |
Method | Description | |
---|---|---|
Awake ( ) : void |
When the script is initialized
|
|
CapturedBy ( Transform capturer, Transform captureSpot, Transform captureRaySpot ) : void |
Tells to this monkey that it is being captured by an enemy hunter drone, setting it up (stop walking, deselect the monkey and doesn't allow it to walk anymore until it's released
|
|
CientistRevealedRocketParts ( ) : void |
The Cientist have finished the researched and found all rocket parts
|
|
EnterNewState ( FSMState, eNewState ) : void |
Changes the FSM to a new state
|
|
ExecuteCurrentState ( ) : void |
Executes the FSM current state
|
|
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
|
|
InstantiateADustCloud ( ) : void |
Instantiate a simple particle emitter to simulate dust on the monkey step. Auto-destroy it after a couple of seconds
|
|
IsInsideAPrison ( ) : bool |
Shortcut to check if a monkey is inside a prison: must be with the isCaptured flag on and be inside a building.
|
|
KillMonkey ( ) : void |
|
|
LeaveCurrentState ( ) : void |
Leaves the current state. Used whenever the FSM enters a new state
|
|
LoadMinimapIcon ( ) : void |
Loads the appropriate icon to display in the minimap. It should depends on the side (allied or opponent), type of object and visibility
|
|
LoopWalkCycle ( ) : void |
Manages the walk cycle loop
|
|
MonkeyAttack ( ) : void | ||
OnAStarReachedEndOfPath ( Transform eventRaiser, bool isMoving ) : void |
What to do when the event is raised.
|
|
OnDisable ( ) : void |
What to do when this object is disabled
|
|
OnDrawGizmos ( ) : void |
Draw some helpers on screen
|
|
OnEnable ( ) : void |
What to do when this object is enabled
|
|
OnSabotageStatusChange ( CBuilding, buildingEventRaiser, bool bnSabotageStatus ) : void |
Called by an event when a building is sabotaged or fixed. Useful for the Cientist, for instance, to know if it can keep researching
|
|
PerformAction ( Transform transTarget, MouseWorldPosition, currentMouseState ) : void |
Attack a target. Actually, 'attack' could be replaced by 'perform some action on...', because we using this function also to repair buildings, capture rocket parts, etc. Performs the 'attack' of the monkey
|
|
ReleaseMe ( ) : void |
When the monkey is released we need to setup a few things before call the ReleaseMe() from CBaseEntity
|
|
Select ( ) : Transform |
Selected is overriden to play a sound
|
|
Update ( ) : void |
Update
|
|
WalkTo ( Vector3 walkTo ) : void |
Used to send a monkey to a point in the terrain. It will keep the target's position and change to the 'walking' state
|
|
WorkIsDone ( ) : void |
The monkey is doing some task, and it's now finished. Check what task it is and call the appropriate function
|
|
getFSMCurrentState ( ) : FSMState, | ||
getResearchIsComplete ( ) : bool | ||
playAckSound ( ) : void | ||
playAttackAckSound ( ) : void | ||
playAttackSound ( ) : void | ||
playCapturedSound ( ) : void | ||
playResearchComplete ( ) : void | ||
playSelectedSound ( ) : void |
Method | Description | |
---|---|---|
CheckIfTargetIsInRange ( ) : bool |
Throws a raycast to check if the target is in range
|
|
GetAttackSpot ( ) : Transform |
Find the attack spot object for the Astronaut monkey
|
|
GetCurrentState ( ) : FSMState, |
Returns the FSM current state
|
public CapturedBy ( Transform capturer, Transform captureSpot, Transform captureRaySpot ) : void | ||
capturer | Transform | |
captureSpot | Transform | |
captureRaySpot | Transform | |
return | void |
public CientistRevealedRocketParts ( ) : void | ||
return | void |
public EnterNewState ( FSMState, eNewState ) : void | ||
eNewState | FSMState, | The new state |
return | void |
public OnAStarReachedEndOfPath ( Transform eventRaiser, bool isMoving ) : void | ||
eventRaiser | Transform | |
isMoving | bool | |
return | void |
public OnSabotageStatusChange ( CBuilding, buildingEventRaiser, bool bnSabotageStatus ) : void | ||
buildingEventRaiser | CBuilding, | CBuilding component of whoever sended the event message |
bnSabotageStatus | bool | True if the building was sabotaged, false if it is fixed |
return | void |
public PerformAction ( Transform transTarget, MouseWorldPosition, currentMouseState ) : void | ||
transTarget | Transform | Transform of the targeted object |
currentMouseState | MouseWorldPosition, | A enum with the mouse state when the player issued an order |
return | void |
public WalkTo ( Vector3 walkTo ) : void | ||
walkTo | Vector3 | A Vector3 with the position to walk to |
return | void |
public AudioClip,UnityEngine sfxAckAstronaut | ||
return |
public AudioClip,UnityEngine sfxAckCientist | ||
return |
public AudioClip,UnityEngine sfxAckDefault | ||
return |
public AudioClip,UnityEngine sfxAckEngineer | ||
return |
public AudioClip,UnityEngine sfxAckSaboteur | ||
return |
public AudioClip,UnityEngine sfxAttackAckAstronaut | ||
return |
public AudioClip,UnityEngine sfxAttackAckCientist | ||
return |
public AudioClip,UnityEngine sfxAttackAckEngineer | ||
return |
public AudioClip,UnityEngine sfxAttackAckSaboteur | ||
return |
public AudioClip,UnityEngine sfxAttackAstronaut | ||
return |
public AudioClip,UnityEngine sfxAttackCientist | ||
return |
public AudioClip,UnityEngine sfxAttackEngineer | ||
return |
public AudioClip,UnityEngine sfxAttackSaboteur | ||
return |
public AudioClip,UnityEngine sfxAttacked | ||
return |
public AudioClip,UnityEngine sfxAttackedAstronaut | ||
return |
public AudioClip,UnityEngine sfxAttackedCientist | ||
return |
public AudioClip,UnityEngine sfxAttackedEngineer | ||
return |
public AudioClip,UnityEngine sfxAttackedSaboteur | ||
return |
public AudioClip,UnityEngine sfxReprogramming | ||
return |
public AudioClip,UnityEngine sfxResearchComplete | ||
return |
public AudioClip,UnityEngine sfxSelectedAstronaut | ||
return |
public AudioClip,UnityEngine sfxSelectedCientist | ||
return |
public AudioClip,UnityEngine sfxSelectedDefault | ||
return |
public AudioClip,UnityEngine sfxSelectedEngineer | ||
return |
public AudioClip,UnityEngine sfxSelectedIdle | ||
return |
public AudioClip,UnityEngine sfxSelectedSaboteur | ||
return |