TopDown Engine  v4.1
MoreMountains.TopDownEngine.Character Class Reference

This class will pilot the TopDownController component of your character. This is where you'll implement all of your character's game rules, like jump, dash, shoot, stuff like that. Animator parameters : Grounded (bool), xSpeed (float), ySpeed (float), CollidingLeft (bool), CollidingRight (bool), CollidingBelow (bool), CollidingAbove (bool), Idle (bool) Random : a random float between 0 and 1, updated every frame, useful to add variance to your state entry transitions for example RandomConstant : a random int (between 0 and 1000), generated at Start and that'll remain constant for the entire lifetime of this animator, useful to have different characters of the same type More...

Inheritance diagram for MoreMountains.TopDownEngine.Character:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Types

enum  FacingDirections { FacingDirections.West, FacingDirections.East, FacingDirections.North, FacingDirections.South }
 the possible initial facing direction for your character More...
 
enum  CharacterDimensions { CharacterDimensions.Type2D, CharacterDimensions.Type3D }
 
enum  CharacterTypes { CharacterTypes.Player, CharacterTypes.AI }
 the possible character types : player controller or AI (controlled by the computer) More...
 

Public Member Functions

virtual void CacheAbilities ()
 Grabs abilities and caches them for further use Make sure you call this if you add abilities at runtime Ideally you'll want to avoid adding components at runtime, it's costly, and it's best to activate/disable components instead. But if you need to, call this method. More...
 
virtual void ForceAbilitiesInitialization ()
 Forces the (re)initialization of the character's abilities More...
 
FindAbility< T > ()
 A method to check whether a Character has a certain ability or not More...
 
CharacterAbility FindAbilityByString (string abilityName)
 A method to check whether a Character has a certain ability or not More...
 
List< T > FindAbilities< T > ()
 A method to check whether a Character has a certain ability or not More...
 
virtual void AssignAnimator (bool forceAssignation=false)
 Binds an animator to this character More...
 
virtual void SetInputManager ()
 Gets (if it exists) the InputManager matching the Character's Player ID More...
 
virtual void SetInputManager (InputManager inputManager)
 Sets a new input manager for this Character and all its abilities More...
 
virtual void ResetInput ()
 Resets the input for all abilities More...
 
virtual void SetPlayerID (string newPlayerID)
 Sets the player ID More...
 
virtual void RespawnAt (Vector3 spawnPosition, FacingDirections facingDirection)
 
virtual void RespawnAt (Transform spawnPoint, FacingDirections facingDirection)
 Makes the player respawn at the location passed in parameters More...
 
virtual void FlipAllAbilities ()
 Calls flip on all abilities More...
 
virtual void ChangeCharacterConditionTemporarily (CharacterStates.CharacterConditions newCondition, float duration, bool resetControllerForces, bool disableGravity)
 Use this method to change the character's condition for a specified duration, and resetting it afterwards. You can also use this to disable gravity for a while, and optionally reset forces too. More...
 
virtual void SetCameraDirection (Vector3 direction)
 Stores the associated camera direction More...
 
virtual void Freeze ()
 Freezes this character. More...
 
virtual void UnFreeze ()
 Unfreezes this character More...
 
virtual void Disable ()
 Called to disable the player (at the end of a level for example. It won't move and respond to input after this. More...
 
virtual void Reset ()
 Called when the Character dies. Calls every abilities' Reset() method, so you can restore settings to their original value if needed More...
 

Public Attributes

CharacterDimensions CharacterDimension
 
CharacterTypes CharacterType = CharacterTypes.AI
 Is the character player-controlled or controlled by an AI ? More...
 
string PlayerID = ""
 Only used if the character is player-controlled. The PlayerID must match an input manager's PlayerID. It's also used to match Unity's input settings. So you'll be safe if you keep to Player1, Player2, Player3 or Player4. More...
 
Animator CharacterAnimator
 the character animator More...
 
bool UseDefaultMecanim = true
 Set this to false if you want to implement your own animation system. More...
 
bool RunAnimatorSanityChecks = false
 If this is true, sanity checks will be performed to make sure animator parameters exist before updating them. Turning this to false will increase performance but will throw errors if you're trying to update non existing parameters. Make sure your animator has the required parameters. More...
 
bool DisableAnimatorLogs = true
 if this is true, animator logs for the associated animator will be turned off to avoid potential spam More...
 
GameObject CharacterModel
 the 'model' (can be any gameobject) used to manipulate the character. Ideally it's separated (and nested) from the collider/TopDown controller/abilities, to avoid messing with collisions. More...
 
Health CharacterHealth
 the Health script associated to this Character, will be grabbed automatically if left empty More...
 
bool SendStateChangeEvents = true
 If this is true, the Character's state machine will emit events when entering/exiting a state. More...
 
List< GameObject > AdditionalAbilityNodes
 A list of gameobjects (usually nested under the Character) under which to search for additional abilities. More...
 
AIBrain CharacterBrain
 The brain currently associated with this character, if it's an Advanced AI. By default the engine will pick the one on this object, but you can attach another one if you'd like. More...
 
bool OptimizeForMobile = true
 Whether to optimize this character for mobile. Will disable its cone of vision on mobile. More...
 
MMStateMachine< CharacterStates.MovementStatesMovementState
 State Machines. More...
 
MMStateMachine< CharacterStates.CharacterConditionsConditionState
 

Protected Member Functions

virtual void Awake ()
 Initializes this instance of the character More...
 
virtual void Initialization ()
 Gets and stores input manager, camera and components More...
 
virtual void CacheAbilitiesAtInit ()
 Caches abilities if necessary More...
 
virtual void InitializeAnimatorParameters ()
 Initializes the animator parameters. More...
 
virtual void UpdateInputManagersInAbilities ()
 Updates the linked input manager for all abilities More...
 
void FixedUpdate ()
 
virtual void Update ()
 This is called every frame. More...
 
virtual void EveryFrame ()
 We do this every frame. This is separate from Update for more flexibility. More...
 
virtual void EarlyProcessAbilities ()
 Calls all registered abilities' Early Process methods More...
 
virtual void ProcessAbilities ()
 Calls all registered abilities' Process methods More...
 
virtual void LateProcessAbilities ()
 Calls all registered abilities' Late Process methods More...
 
virtual void UpdateAnimators ()
 This is called at Update() and sets each of the animators parameters to their corresponding State values More...
 
virtual void UpdateAnimationRandomNumber ()
 Generates a random number to send to the animator More...
 
virtual IEnumerator ChangeCharacterConditionTemporarilyCo (CharacterStates.CharacterConditions newCondition, float duration, bool resetControllerForces, bool disableGravity)
 Coroutine handling the temporary change of condition mandated by ChangeCharacterConditionTemporarily More...
 
virtual void OnRevive ()
 On revive, we force the spawn direction More...
 
virtual void OnDeath ()
 
virtual void OnHit ()
 
virtual void OnEnable ()
 OnEnable, we register our OnRevive event More...
 
virtual void OnDisable ()
 OnDisable, we unregister our OnRevive event More...
 

Protected Attributes

CharacterAbility[] _characterAbilities
 
bool _abilitiesCachedOnce = false
 
TopDownController _controller
 
float _animatorRandomNumber
 
bool _spawnDirectionForced = false
 
int _groundedAnimationParameter
 
int _aliveAnimationParameter
 
int _currentSpeedAnimationParameter
 
int _xSpeedAnimationParameter
 
int _ySpeedAnimationParameter
 
int _zSpeedAnimationParameter
 
int _xVelocityAnimationParameter
 
int _yVelocityAnimationParameter
 
int _zVelocityAnimationParameter
 
int _transformVelocityXAnimationParameter
 
int _transformVelocityYAnimationParameter
 
int _transformVelocityZAnimationParameter
 
int _idleAnimationParameter
 
int _randomAnimationParameter
 
int _randomConstantAnimationParameter
 
bool _animatorInitialized = false
 
CharacterPersistence _characterPersistence
 
bool _onReviveRegistered
 
Coroutine _conditionChangeCoroutine
 
CharacterStates.CharacterConditions _lastState
 
Vector3 _transformVelocity
 
Vector3 _thisPositionLastFrame
 

Static Protected Attributes

const string _groundedAnimationParameterName = "Grounded"
 
const string _aliveAnimationParameterName = "Alive"
 
const string _currentSpeedAnimationParameterName = "CurrentSpeed"
 
const string _xSpeedAnimationParameterName = "xSpeed"
 
const string _ySpeedAnimationParameterName = "ySpeed"
 
const string _zSpeedAnimationParameterName = "zSpeed"
 
const string _xVelocityAnimationParameterName = "xVelocity"
 
const string _yVelocityAnimationParameterName = "yVelocity"
 
const string _zVelocityAnimationParameterName = "zVelocity"
 
const string _idleAnimationParameterName = "Idle"
 
const string _randomAnimationParameterName = "Random"
 
const string _randomConstantAnimationParameterName = "RandomConstant"
 
const string _transformVelocityXAnimationParameterName = "TransformVelocityX"
 
const string _transformVelocityYAnimationParameterName = "TransformVelocityY"
 
const string _transformVelocityZAnimationParameterName = "TransformVelocityZ"
 

Properties

virtual CharacterStates CharacterState [get, protected set]
 the various states of the character More...
 
virtual InputManager LinkedInputManager [get, protected set]
 associated camera and input manager More...
 
virtual Animator _animator [get, protected set]
 the animator associated to this character More...
 
virtual HashSet< int > _animatorParameters [get, set]
 a list of animator parameters More...
 
virtual CharacterOrientation2D Orientation2D [get, protected set]
 this character's orientation 2D ability More...
 
virtual CharacterOrientation3D Orientation3D [get, protected set]
 this character's orientation 3D ability More...
 
virtual GameObject CameraTarget [get, set]
 an object to use as the camera's point of focus and follow target More...
 
virtual Vector3 CameraDirection [get, protected set]
 the direction of the camera associated to this character More...
 

Detailed Description

This class will pilot the TopDownController component of your character. This is where you'll implement all of your character's game rules, like jump, dash, shoot, stuff like that. Animator parameters : Grounded (bool), xSpeed (float), ySpeed (float), CollidingLeft (bool), CollidingRight (bool), CollidingBelow (bool), CollidingAbove (bool), Idle (bool) Random : a random float between 0 and 1, updated every frame, useful to add variance to your state entry transitions for example RandomConstant : a random int (between 0 and 1000), generated at Start and that'll remain constant for the entire lifetime of this animator, useful to have different characters of the same type

Member Enumeration Documentation

◆ CharacterDimensions

Enumerator
Type2D 
Type3D 

◆ CharacterTypes

the possible character types : player controller or AI (controlled by the computer)

Enumerator
Player 
AI 

◆ FacingDirections

the possible initial facing direction for your character

Enumerator
West 
East 
North 
South 

Member Function Documentation

◆ AssignAnimator()

virtual void MoreMountains.TopDownEngine.Character.AssignAnimator ( bool  forceAssignation = false)
virtual

Binds an animator to this character

◆ Awake()

virtual void MoreMountains.TopDownEngine.Character.Awake ( )
protectedvirtual

Initializes this instance of the character

◆ CacheAbilities()

virtual void MoreMountains.TopDownEngine.Character.CacheAbilities ( )
virtual

Grabs abilities and caches them for further use Make sure you call this if you add abilities at runtime Ideally you'll want to avoid adding components at runtime, it's costly, and it's best to activate/disable components instead. But if you need to, call this method.

◆ CacheAbilitiesAtInit()

virtual void MoreMountains.TopDownEngine.Character.CacheAbilitiesAtInit ( )
protectedvirtual

Caches abilities if necessary

◆ ChangeCharacterConditionTemporarily()

virtual void MoreMountains.TopDownEngine.Character.ChangeCharacterConditionTemporarily ( CharacterStates.CharacterConditions  newCondition,
float  duration,
bool  resetControllerForces,
bool  disableGravity 
)
virtual

Use this method to change the character's condition for a specified duration, and resetting it afterwards. You can also use this to disable gravity for a while, and optionally reset forces too.

Parameters
newCondition
duration
resetControllerForces
disableGravity

◆ ChangeCharacterConditionTemporarilyCo()

virtual IEnumerator MoreMountains.TopDownEngine.Character.ChangeCharacterConditionTemporarilyCo ( CharacterStates.CharacterConditions  newCondition,
float  duration,
bool  resetControllerForces,
bool  disableGravity 
)
protectedvirtual

Coroutine handling the temporary change of condition mandated by ChangeCharacterConditionTemporarily

Parameters
newCondition
duration
resetControllerForces
disableGravity
Returns

◆ Disable()

virtual void MoreMountains.TopDownEngine.Character.Disable ( )
virtual

Called to disable the player (at the end of a level for example. It won't move and respond to input after this.

◆ EarlyProcessAbilities()

virtual void MoreMountains.TopDownEngine.Character.EarlyProcessAbilities ( )
protectedvirtual

Calls all registered abilities' Early Process methods

◆ EveryFrame()

virtual void MoreMountains.TopDownEngine.Character.EveryFrame ( )
protectedvirtual

We do this every frame. This is separate from Update for more flexibility.

◆ FindAbilities< T >()

List<T> MoreMountains.TopDownEngine.Character.FindAbilities< T > ( )

A method to check whether a Character has a certain ability or not

Template Parameters
T
Returns
Type Constraints
T :CharacterAbility 

◆ FindAbility< T >()

T MoreMountains.TopDownEngine.Character.FindAbility< T > ( )

A method to check whether a Character has a certain ability or not

Template Parameters
T
Returns
Type Constraints
T :CharacterAbility 

◆ FindAbilityByString()

CharacterAbility MoreMountains.TopDownEngine.Character.FindAbilityByString ( string  abilityName)

A method to check whether a Character has a certain ability or not

Template Parameters
T
Returns

◆ FixedUpdate()

void MoreMountains.TopDownEngine.Character.FixedUpdate ( )
protected

◆ FlipAllAbilities()

virtual void MoreMountains.TopDownEngine.Character.FlipAllAbilities ( )
virtual

Calls flip on all abilities

◆ ForceAbilitiesInitialization()

virtual void MoreMountains.TopDownEngine.Character.ForceAbilitiesInitialization ( )
virtual

Forces the (re)initialization of the character's abilities

◆ Freeze()

virtual void MoreMountains.TopDownEngine.Character.Freeze ( )
virtual

Freezes this character.

◆ Initialization()

virtual void MoreMountains.TopDownEngine.Character.Initialization ( )
protectedvirtual

Gets and stores input manager, camera and components

◆ InitializeAnimatorParameters()

virtual void MoreMountains.TopDownEngine.Character.InitializeAnimatorParameters ( )
protectedvirtual

Initializes the animator parameters.

◆ LateProcessAbilities()

virtual void MoreMountains.TopDownEngine.Character.LateProcessAbilities ( )
protectedvirtual

Calls all registered abilities' Late Process methods

◆ OnDeath()

virtual void MoreMountains.TopDownEngine.Character.OnDeath ( )
protectedvirtual

◆ OnDisable()

virtual void MoreMountains.TopDownEngine.Character.OnDisable ( )
protectedvirtual

OnDisable, we unregister our OnRevive event

◆ OnEnable()

virtual void MoreMountains.TopDownEngine.Character.OnEnable ( )
protectedvirtual

OnEnable, we register our OnRevive event

◆ OnHit()

virtual void MoreMountains.TopDownEngine.Character.OnHit ( )
protectedvirtual

◆ OnRevive()

virtual void MoreMountains.TopDownEngine.Character.OnRevive ( )
protectedvirtual

On revive, we force the spawn direction

◆ ProcessAbilities()

virtual void MoreMountains.TopDownEngine.Character.ProcessAbilities ( )
protectedvirtual

Calls all registered abilities' Process methods

◆ Reset()

virtual void MoreMountains.TopDownEngine.Character.Reset ( )
virtual

Called when the Character dies. Calls every abilities' Reset() method, so you can restore settings to their original value if needed

◆ ResetInput()

virtual void MoreMountains.TopDownEngine.Character.ResetInput ( )
virtual

Resets the input for all abilities

◆ RespawnAt() [1/2]

virtual void MoreMountains.TopDownEngine.Character.RespawnAt ( Transform  spawnPoint,
FacingDirections  facingDirection 
)
virtual

Makes the player respawn at the location passed in parameters

Parameters
spawnPointThe location of the respawn.

◆ RespawnAt() [2/2]

virtual void MoreMountains.TopDownEngine.Character.RespawnAt ( Vector3  spawnPosition,
FacingDirections  facingDirection 
)
virtual

◆ SetCameraDirection()

virtual void MoreMountains.TopDownEngine.Character.SetCameraDirection ( Vector3  direction)
virtual

Stores the associated camera direction

◆ SetInputManager() [1/2]

virtual void MoreMountains.TopDownEngine.Character.SetInputManager ( )
virtual

Gets (if it exists) the InputManager matching the Character's Player ID

◆ SetInputManager() [2/2]

virtual void MoreMountains.TopDownEngine.Character.SetInputManager ( InputManager  inputManager)
virtual

Sets a new input manager for this Character and all its abilities

Parameters
inputManager

◆ SetPlayerID()

virtual void MoreMountains.TopDownEngine.Character.SetPlayerID ( string  newPlayerID)
virtual

Sets the player ID

Parameters
newPlayerIDNew player ID.

◆ UnFreeze()

virtual void MoreMountains.TopDownEngine.Character.UnFreeze ( )
virtual

Unfreezes this character

◆ Update()

virtual void MoreMountains.TopDownEngine.Character.Update ( )
protectedvirtual

This is called every frame.

◆ UpdateAnimationRandomNumber()

virtual void MoreMountains.TopDownEngine.Character.UpdateAnimationRandomNumber ( )
protectedvirtual

Generates a random number to send to the animator

◆ UpdateAnimators()

virtual void MoreMountains.TopDownEngine.Character.UpdateAnimators ( )
protectedvirtual

This is called at Update() and sets each of the animators parameters to their corresponding State values

◆ UpdateInputManagersInAbilities()

virtual void MoreMountains.TopDownEngine.Character.UpdateInputManagersInAbilities ( )
protectedvirtual

Updates the linked input manager for all abilities

Member Data Documentation

◆ _abilitiesCachedOnce

bool MoreMountains.TopDownEngine.Character._abilitiesCachedOnce = false
protected

◆ _aliveAnimationParameter

int MoreMountains.TopDownEngine.Character._aliveAnimationParameter
protected

◆ _aliveAnimationParameterName

const string MoreMountains.TopDownEngine.Character._aliveAnimationParameterName = "Alive"
staticprotected

◆ _animatorInitialized

bool MoreMountains.TopDownEngine.Character._animatorInitialized = false
protected

◆ _animatorRandomNumber

float MoreMountains.TopDownEngine.Character._animatorRandomNumber
protected

◆ _characterAbilities

CharacterAbility [] MoreMountains.TopDownEngine.Character._characterAbilities
protected

◆ _characterPersistence

CharacterPersistence MoreMountains.TopDownEngine.Character._characterPersistence
protected

◆ _conditionChangeCoroutine

Coroutine MoreMountains.TopDownEngine.Character._conditionChangeCoroutine
protected

◆ _controller

TopDownController MoreMountains.TopDownEngine.Character._controller
protected

◆ _currentSpeedAnimationParameter

int MoreMountains.TopDownEngine.Character._currentSpeedAnimationParameter
protected

◆ _currentSpeedAnimationParameterName

const string MoreMountains.TopDownEngine.Character._currentSpeedAnimationParameterName = "CurrentSpeed"
staticprotected

◆ _groundedAnimationParameter

int MoreMountains.TopDownEngine.Character._groundedAnimationParameter
protected

◆ _groundedAnimationParameterName

const string MoreMountains.TopDownEngine.Character._groundedAnimationParameterName = "Grounded"
staticprotected

◆ _idleAnimationParameter

int MoreMountains.TopDownEngine.Character._idleAnimationParameter
protected

◆ _idleAnimationParameterName

const string MoreMountains.TopDownEngine.Character._idleAnimationParameterName = "Idle"
staticprotected

◆ _lastState

CharacterStates.CharacterConditions MoreMountains.TopDownEngine.Character._lastState
protected

◆ _onReviveRegistered

bool MoreMountains.TopDownEngine.Character._onReviveRegistered
protected

◆ _randomAnimationParameter

int MoreMountains.TopDownEngine.Character._randomAnimationParameter
protected

◆ _randomAnimationParameterName

const string MoreMountains.TopDownEngine.Character._randomAnimationParameterName = "Random"
staticprotected

◆ _randomConstantAnimationParameter

int MoreMountains.TopDownEngine.Character._randomConstantAnimationParameter
protected

◆ _randomConstantAnimationParameterName

const string MoreMountains.TopDownEngine.Character._randomConstantAnimationParameterName = "RandomConstant"
staticprotected

◆ _spawnDirectionForced

bool MoreMountains.TopDownEngine.Character._spawnDirectionForced = false
protected

◆ _thisPositionLastFrame

Vector3 MoreMountains.TopDownEngine.Character._thisPositionLastFrame
protected

◆ _transformVelocity

Vector3 MoreMountains.TopDownEngine.Character._transformVelocity
protected

◆ _transformVelocityXAnimationParameter

int MoreMountains.TopDownEngine.Character._transformVelocityXAnimationParameter
protected

◆ _transformVelocityXAnimationParameterName

const string MoreMountains.TopDownEngine.Character._transformVelocityXAnimationParameterName = "TransformVelocityX"
staticprotected

◆ _transformVelocityYAnimationParameter

int MoreMountains.TopDownEngine.Character._transformVelocityYAnimationParameter
protected

◆ _transformVelocityYAnimationParameterName

const string MoreMountains.TopDownEngine.Character._transformVelocityYAnimationParameterName = "TransformVelocityY"
staticprotected

◆ _transformVelocityZAnimationParameter

int MoreMountains.TopDownEngine.Character._transformVelocityZAnimationParameter
protected

◆ _transformVelocityZAnimationParameterName

const string MoreMountains.TopDownEngine.Character._transformVelocityZAnimationParameterName = "TransformVelocityZ"
staticprotected

◆ _xSpeedAnimationParameter

int MoreMountains.TopDownEngine.Character._xSpeedAnimationParameter
protected

◆ _xSpeedAnimationParameterName

const string MoreMountains.TopDownEngine.Character._xSpeedAnimationParameterName = "xSpeed"
staticprotected

◆ _xVelocityAnimationParameter

int MoreMountains.TopDownEngine.Character._xVelocityAnimationParameter
protected

◆ _xVelocityAnimationParameterName

const string MoreMountains.TopDownEngine.Character._xVelocityAnimationParameterName = "xVelocity"
staticprotected

◆ _ySpeedAnimationParameter

int MoreMountains.TopDownEngine.Character._ySpeedAnimationParameter
protected

◆ _ySpeedAnimationParameterName

const string MoreMountains.TopDownEngine.Character._ySpeedAnimationParameterName = "ySpeed"
staticprotected

◆ _yVelocityAnimationParameter

int MoreMountains.TopDownEngine.Character._yVelocityAnimationParameter
protected

◆ _yVelocityAnimationParameterName

const string MoreMountains.TopDownEngine.Character._yVelocityAnimationParameterName = "yVelocity"
staticprotected

◆ _zSpeedAnimationParameter

int MoreMountains.TopDownEngine.Character._zSpeedAnimationParameter
protected

◆ _zSpeedAnimationParameterName

const string MoreMountains.TopDownEngine.Character._zSpeedAnimationParameterName = "zSpeed"
staticprotected

◆ _zVelocityAnimationParameter

int MoreMountains.TopDownEngine.Character._zVelocityAnimationParameter
protected

◆ _zVelocityAnimationParameterName

const string MoreMountains.TopDownEngine.Character._zVelocityAnimationParameterName = "zVelocity"
staticprotected

◆ AdditionalAbilityNodes

List<GameObject> MoreMountains.TopDownEngine.Character.AdditionalAbilityNodes

A list of gameobjects (usually nested under the Character) under which to search for additional abilities.

◆ CharacterAnimator

Animator MoreMountains.TopDownEngine.Character.CharacterAnimator

the character animator

◆ CharacterBrain

AIBrain MoreMountains.TopDownEngine.Character.CharacterBrain

The brain currently associated with this character, if it's an Advanced AI. By default the engine will pick the one on this object, but you can attach another one if you'd like.

◆ CharacterDimension

CharacterDimensions MoreMountains.TopDownEngine.Character.CharacterDimension

◆ CharacterHealth

Health MoreMountains.TopDownEngine.Character.CharacterHealth

the Health script associated to this Character, will be grabbed automatically if left empty

◆ CharacterModel

GameObject MoreMountains.TopDownEngine.Character.CharacterModel

the 'model' (can be any gameobject) used to manipulate the character. Ideally it's separated (and nested) from the collider/TopDown controller/abilities, to avoid messing with collisions.

◆ CharacterType

CharacterTypes MoreMountains.TopDownEngine.Character.CharacterType = CharacterTypes.AI

Is the character player-controlled or controlled by an AI ?

◆ ConditionState

MMStateMachine<CharacterStates.CharacterConditions> MoreMountains.TopDownEngine.Character.ConditionState

◆ DisableAnimatorLogs

bool MoreMountains.TopDownEngine.Character.DisableAnimatorLogs = true

if this is true, animator logs for the associated animator will be turned off to avoid potential spam

◆ MovementState

MMStateMachine<CharacterStates.MovementStates> MoreMountains.TopDownEngine.Character.MovementState

State Machines.

◆ OptimizeForMobile

bool MoreMountains.TopDownEngine.Character.OptimizeForMobile = true

Whether to optimize this character for mobile. Will disable its cone of vision on mobile.

◆ PlayerID

string MoreMountains.TopDownEngine.Character.PlayerID = ""

Only used if the character is player-controlled. The PlayerID must match an input manager's PlayerID. It's also used to match Unity's input settings. So you'll be safe if you keep to Player1, Player2, Player3 or Player4.

◆ RunAnimatorSanityChecks

bool MoreMountains.TopDownEngine.Character.RunAnimatorSanityChecks = false

If this is true, sanity checks will be performed to make sure animator parameters exist before updating them. Turning this to false will increase performance but will throw errors if you're trying to update non existing parameters. Make sure your animator has the required parameters.

◆ SendStateChangeEvents

bool MoreMountains.TopDownEngine.Character.SendStateChangeEvents = true

If this is true, the Character's state machine will emit events when entering/exiting a state.

◆ UseDefaultMecanim

bool MoreMountains.TopDownEngine.Character.UseDefaultMecanim = true

Set this to false if you want to implement your own animation system.

Property Documentation

◆ _animator

virtual Animator MoreMountains.TopDownEngine.Character._animator
getprotected set

the animator associated to this character

◆ _animatorParameters

virtual HashSet<int> MoreMountains.TopDownEngine.Character._animatorParameters
getset

a list of animator parameters

◆ CameraDirection

virtual Vector3 MoreMountains.TopDownEngine.Character.CameraDirection
getprotected set

the direction of the camera associated to this character

◆ CameraTarget

virtual GameObject MoreMountains.TopDownEngine.Character.CameraTarget
getset

an object to use as the camera's point of focus and follow target

◆ CharacterState

virtual CharacterStates MoreMountains.TopDownEngine.Character.CharacterState
getprotected set

the various states of the character

◆ LinkedInputManager

virtual InputManager MoreMountains.TopDownEngine.Character.LinkedInputManager
getprotected set

associated camera and input manager

◆ Orientation2D

virtual CharacterOrientation2D MoreMountains.TopDownEngine.Character.Orientation2D
getprotected set

this character's orientation 2D ability

◆ Orientation3D

virtual CharacterOrientation3D MoreMountains.TopDownEngine.Character.Orientation3D
getprotected set

this character's orientation 3D ability


The documentation for this class was generated from the following file: