Methods and Properties

Public Methods and Properties you can use via script and Unity Events.

Properties

Mount Montura

{get; private set; }

Mount component of the animal stored when the Riders enters a Mount Trigger

IAIControl MonturaAI

{get; private set; }

Store the AIAnimalControl attached to the Mount Animal

IInputSource MountInput

{get; private set; }

Store the Input interface Attached to the Mount (Usually Malbers Input component)

bool CanMount

{get; private set; }

Checks if the Rider can mount an Animal. It will be set to true if the Rider is inside a Mount Trigger

bool CanDismount {get; private set; }

{get; private set; }

Checks if the Rider can Dismount an Animal. The rider must be already mounted

bool Mounted

{get; private set; }

True: Rider starts Mounting and is mounted False: Rider starts Dismounting and is dismounted. This value goes to the Animator as a parameter.

bool IsOnHorse

{get; private set; }

This is true when the rider Finish Mounting , and False when the rider Finish Dismounting

bool CanCallAnimal

{get; private set; }

Check if we can call a Mount. This is only true when we have a stored Mount on the Rider component and we are not mounting any animal.

float SpeedMultiplier

{get; set; }

Speed Multiplier for the Animator Speeds Changes while using other Animals but the horse

bool IsRiding

{get;}

Returns true if the Rider is on the horse and Mount animations are finished

bool IsMountingDismounting

{get;}

Returns true if the Rider is from the Start of the Mount to the End of the Dismount

bool IsMounting

{get;}

Returns true if the Rider is between the Start and the End of the Mount Animations

bool IsDismounting

{get;}

Returns true if the Rider is between the Start and the End of the Dismount Animations

Animator Anim

{get;}

Reference of the Animator Component

Methods

void MountAnimal()

Execute the Logic for mounting an Animal. CanMount must be true.

This method is usually called by a Mount Input

void DismountAnimal()

Execute the Logic for Dismounting an Animal. CanDismount must be true.

This method is usually called by a Dismount Input

void Start_Mounted()

Set all the correct attributes and variables to Start Mounted on the on Awake.

this is called on Start when the StartMounted parameter is true and we have set a Stored Mounted.

void StopMountAI()

If the Mount has a AI Control Movement component it will stop the Mount from moving

void ForceDismount()

Forces the Rider to Dismount, Execute the StartDismount() and EndDismount() Methods.

void UpdateRiderTransform()

Updates the Rider Position to the Mount Point

void EnableMountInput(bool value)

Enable/Disable the Input for the Mount

void CallAnimal(bool value)

If the Animal has a IMountAI component and it can be called the Animal will walk towards the Rider

void CheckMountDismount()

Checks and Execute without Input if the Rider can Mount, Dismount or Call an Animal

Last updated