GAC API Reference


GAC provides an extensible list of APIs to allow a lot of control of GAC for custom setups. Click the links to quick jump:

PlayTheAnimation() - For Single Player 

PlayTheAnimation() - For Multi-Player (Default) 
TargetHit()
AddTarget() - For Single Player
AddTarget() - For Multi-Player (Default)
RemoveTarget() - For Single Player
RemoveTarget() - For Multi-Player
IsPlaying()
ArePlaying()
AnimationPlaying()
UpdateContext() - String
UpdateContext() - Int
UpdateContext() - Float
UpdateContext() - Bool
UpdateContext() - Parameters
UpdateContext() - Parameter Trigger

void PlayTheAnimation(string starterName, int activator)

Variables:

starterName - The name of the animation that starts the combo
activator - The activator number used to call this sequence in combo

Description:

Play the animation in the combo

Example:


_________________________________________________________________________________________

void PlayTheAnimation(GameObject mainObject, string StarterName, int Activator)

Variables:
mainObject - The GAC game object to call the combos for
starterName - The name of the animation that starts the combo
activator - The activator number used to call this sequence in combo

Description:
Play the animation in the combo for a specific game object; use this if creating multiplayer games. This is the default animation player that GAC uses for it's Activator Menu.


Example:


_________________________________________________________________________________________

bool TargetHit(GameObject target, GameObject mainObject)

Variables:
target - The target game object that is being attacked
mainObject - The game object that is attacking the target

Description:

Check if the GameObject that the player is attacking has been hit.


Example:


_________________________________________________________________________________________

void AddTarget(GameObject mainObject)

Variables:
mainObject - The GAC game object to call the combos for

Description:

Add a Gameobject to be tracked by the target tracker for hit detections. Use for only Single Player games.


Example:


_________________________________________________________________________________________

void AddTarget(GameObject mainObject, GameObject target)


Variables:
mainObject - The GAC game object to to use
target - The game object to add to Target Tracker

Description:

Add a Gameobject to be tracked by the target tracker for hit detections. Use for only Single Player games.

Example:



_________________________________________________________________________________________

void RemoveTarget(GameObject mainObject)

Variables:
mainObject - The GAC game object to to use

Description:

Remove a target from hit detection


Example:


_________________________________________________________________________________________

void RemoveTarget(GameObject mainObject, GameObject target) 

Variables:

mainObject - The GAC game object to to use
target - The game object to remove from Target Tracker

Description:
Add a Gameobject to be tracked by the target tracker for hit detections

Example:


_________________________________________________________________________________________

bool IsPlaying(GameObject mainObject, string animName)

Variables:
mainObject - The GAC game object to call the combos for
animName - The animation name to check for

Description:

Check if a specific GAC animation is playing


Example:


_________________________________________________________________________________________

bool ArePlaying(GameObject mainObject)

Variables:

mainObject - The GAC game object to call the combos for

Description:

Returns true/false depending on if any GAC animations are playing for game object


Example:


_________________________________________________________________________________________

string AnimationPlaying(GameObject mainObject)

Variables:

mainObject - The GAC game object to call the combos for

Description:

Returns the name of the GAC animation playing

Example:


_________________________________________________________________________________________

string UpdateContext(GameObject mainObject, string contextName, string comparisonString, string newValue)


Variables:
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
compare - The comparison string to use - Equal, Not Equal
newValue - The new string value to update context to

Description:
Updates the Context Variables for Strings to check if conditions are met 


Example:


_________________________________________________________________________________________

int UpdateContext(GameObject mainObject, string contextName, string compare, int newValue)


Variables:
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
compare - The comparison string to use - Greater, Less, Equal
newValue - The new int value to update context to

Description:
Updates the Context Variables for Ints to check if conditions are met  


Example:


_________________________________________________________________________________________

float UpdateContext(GameObject mainObject, string contextName, string compare, float newValue)


Variables:
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
compare - The comparison string to use - Greater, Less, Equal
newValue - The new float value to update context to

Description:
Updates the Context Variables for Floats to check if conditions are met 


Example:


_________________________________________________________________________________________

bool UpdateContext(GameObject mainObject, string contextName, bool newValue)


Variables:
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
compare - The comparison string to use - Greater, Less, Equal
newValue - The new bool value to update context to

Description:
Updates the Context Variables for Bools to check if conditions are met 


Example:



_________________________________________________________________________________________

void UpdateContext(string isParam, GameObject mainObject, string contextName, string paramType, string compare, string newValue)


Variables:
isParam - The Initial to signify the use of Parameter Context Variables; type "P"
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
paramType - The type of Mecanim Parameter to use (Int, Float, Bool)
compare - The comparison string to use - Greater, Less, Equal
newValue - The new float value to update context to

Description:
Updates the Context Variables for Mecanim Animator Parameters to check if conditions are met


Example:


_________________________________________________________________________________________

void UpdateContext(string isParam, GameObject mainObject, string contextName, string paramType)

Variables:
isParam - The Initial to signify the use of Parameter Context Variables; type "P"
mainObject - The GAC game object to call the combos for
contextName - The name of the context variable to call
paramType - The type of Mecanim Parameter to use (This is only for Triggers so type "Triggers")

Description:
Updates the context variables for Mecanim Animator Trigger Parameter type to check if conditions are met


Example: