Adventure Creator  1.57
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2017
AC.AnimEngine Class Reference
Inheritance diagram for AC.AnimEngine:
AC.AnimEngine_Legacy AC.AnimEngine_Mecanim AC.AnimEngine_Sprites2DToolkit AC.AnimEngine_SpritesUnity AC.AnimEngine_SpritesUnityComplex

Public Member Functions

virtual void Declare (AC.Char _character)
 Initialises the engine. More...
 
virtual void CharSettingsGUI ()
 
virtual void ActionCharAnimGUI (ActionCharAnim action, List< ActionParameter > parameters=null)
 
virtual float ActionCharAnimRun (ActionCharAnim action)
 
virtual void ActionCharAnimSkip (ActionCharAnim action)
 
virtual bool ActionCharHoldPossible ()
 
virtual void ActionSpeechGUI (ActionSpeech action, Char speaker)
 
virtual void ActionSpeechRun (ActionSpeech action)
 
virtual void ActionSpeechSkip (ActionSpeech action)
 
virtual void ActionAnimGUI (ActionAnim action, List< ActionParameter > parameters)
 
virtual string ActionAnimLabel (ActionAnim action)
 
virtual void ActionAnimAssignValues (ActionAnim action, List< ActionParameter > parameters)
 
virtual float ActionAnimRun (ActionAnim action)
 
virtual void ActionAnimSkip (ActionAnim action)
 
virtual void ActionCharRenderGUI (ActionCharRender action)
 
virtual float ActionCharRenderRun (ActionCharRender action)
 
virtual void PlayIdle ()
 
virtual void PlayWalk ()
 
virtual void PlayRun ()
 
virtual void PlayTalk ()
 
virtual void PlayVertical ()
 
virtual void PlayJump ()
 
virtual void PlayTurnLeft ()
 
virtual void PlayTurnRight ()
 
virtual void TurnHead (Vector2 angles)
 Rotates a character's head. More...
 
virtual void AddSaveScript (Action _action, GameObject _gameObject)
 Adds any relevent Remember scripts onto a GameObject referenced by an animation-based Action. More...
 

Public Attributes

TurningStyle turningStyle = TurningStyle.Script
 
bool isSpriteBased = false
 

Protected Attributes

AC.Char character
 

Detailed Description

A base class for all Animation Engines. Subclasses of this script contain functions to perform standard character animations (e.g "Idle", "Walk", etc) and are called as appropriately by Player / NPC. It also contains code that alter each of the various animation Actions (e.g. ActionAnim). To create a new animation engine to control an NPC or Player, create a new subclass of this script and set the character's animationEngine to AnimationEngine.Custom. Then set the character's customAnimationClass string to match the name of the new subclass.

Member Function Documentation

virtual void AC.AnimEngine.AddSaveScript ( Action  _action,
GameObject  _gameObject 
)
virtual

Adds any relevent Remember scripts onto a GameObject referenced by an animation-based Action.

Parameters
_actionThe Action referencing the GameObject
_gameObjectThe GameObject being referenced

Reimplemented in AC.AnimEngine_Mecanim, and AC.AnimEngine_SpritesUnityComplex.

virtual void AC.AnimEngine.Declare ( AC.Char  _character)
virtual

Initialises the engine.

Parameters
_characterThe Player/NPC that this instance is controlling.

Reimplemented in AC.AnimEngine_SpritesUnity, AC.AnimEngine_Mecanim, AC.AnimEngine_SpritesUnityComplex, and AC.AnimEngine_Sprites2DToolkit.

virtual void AC.AnimEngine.PlayIdle ( )
virtual
virtual void AC.AnimEngine.PlayJump ( )
virtual

Plays the character's 'Jump' animation.

Reimplemented in AC.AnimEngine_Mecanim, and AC.AnimEngine_Legacy.

virtual void AC.AnimEngine.PlayRun ( )
virtual
virtual void AC.AnimEngine.PlayTalk ( )
virtual
virtual void AC.AnimEngine.PlayTurnLeft ( )
virtual

Plays the character's 'Spot-turn left' animation.

Reimplemented in AC.AnimEngine_Legacy, and AC.AnimEngine_SpritesUnityComplex.

virtual void AC.AnimEngine.PlayTurnRight ( )
virtual

Plays the character's 'Spot-turn right' animation.

Reimplemented in AC.AnimEngine_Legacy, and AC.AnimEngine_SpritesUnityComplex.

virtual void AC.AnimEngine.PlayVertical ( )
virtual

Called every frame to animate the character based on height change. The character's height change can be found with GetHeightChange ().

Reimplemented in AC.AnimEngine_Mecanim, and AC.AnimEngine_SpritesUnityComplex.

virtual void AC.AnimEngine.PlayWalk ( )
virtual
virtual void AC.AnimEngine.TurnHead ( Vector2  angles)
virtual

Rotates a character's head.

Parameters
anglesThe new angles to rotate the head to

Reimplemented in AC.AnimEngine_Legacy, and AC.AnimEngine_Mecanim.

Member Data Documentation

bool AC.AnimEngine.isSpriteBased = false

If True, then the engine is sprite-based, and character's will rely on their spriteChild for animation

TurningStyle AC.AnimEngine.turningStyle = TurningStyle.Script

How character turning is handled (Linear, RootMotion, Script)