Infinite Runner Engine v2.2
Loading...
Searching...
No Matches
MoreMountains.InfiniteRunnerEngine.AlbatrossController Class Reference

The character controller for the main character in the Flight of the Albatross demo scene. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.AlbatrossController:
MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement MoreMountains.InfiniteRunnerEngine.PlayableCharacter

Public Attributes

GameObject AlbatrossBody
 the gameobject containing the albatross model, used for rotation without affecting the boxcollider
float MaximumAlbatrossRotation = 45f
 the maximum angle, in degrees, at which the albatross can rotate
Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement
PossibleMovementAxis MovementAxis
 the axis you want your character to move on
float MoveSpeed = 5f
 the character's movement speed
float MovementInertia
 the movement inertia (the higher it is, the longer it takes for it to stop / change direction
bool ConstrainMovementToDeathBounds = true
 if true, the character will stop before reaching the level's death bounds
Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
bool UseDefaultMecanim = true
 should we use the default mecanim ?
bool ShouldResetPosition = true
 returns true if the character is currently grounded
float ResetPositionSpeed = 0.5f
float GroundDistanceTolerance = 0.05f
 the distance tolerance at which a character is considered grounded
float InitialInvincibilityDuration = 3f
 the duration (in seconds) of invincibility on spawn

Protected Member Functions

override void Start ()
 On Start, we get a random variation for the albatross movement.
override void Update ()
 On update we just handle our character's movement.
virtual void HandleAlbatrossMovement ()
 Handles the albatross movement.
Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement
override void Start ()
 On start we set bounds and movement axis based on what's been set in the inspector.
override void Update ()
 On update we just handle our character's movement.
virtual void MoveCharacter ()
 Every frame, we move our character.
Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
virtual void Awake ()
 Use this for initialization.
virtual void Initialize ()
 This method initializes all essential elements.
virtual void ComputeDistanceToTheGround ()
 Determines the distance between the Jumper and the ground.
virtual bool DetermineIfGroudedConditionsAreMet ()
 Determines if grouded conditions are met.
virtual void CheckDeathConditions ()
 Checks the death conditions.
virtual Bounds GetPlayableCharacterBounds ()
 Gets the playable character bounds.
virtual void UpdateAnimator ()
 This is called at Update() and sets each of the animators parameters to their corresponding State values.
virtual void UpdateAllMecanimAnimators ()
 Updates all mecanim animators.
virtual void ResetPosition ()
 Called on update, tries to return the object to its initial position.
virtual void OnCollisionEnter2D (Collision2D collidingObject)
 Handles enter collision with 2D colliders.
virtual void OnCollisionExit2D (Collision2D collidingObject)
 Handles exit collision with 2D colliders.
virtual void OnCollisionEnter (Collision collidingObject)
 Handles enter collision with 3D colliders.
virtual void OnCollisionExit (Collision collidingObject)
 Handles exit collision with 3D colliders.
virtual void OnTriggerEnter2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers.
virtual void OnTriggerExit2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers.
virtual void OnTriggerEnter (Collider collidingObject)
 Handles enter collision with 2D triggers.
virtual void OnTriggerExit (Collider collidingObject)
 Handles enter collision with 2D triggers.
virtual void CollisionEnter (GameObject collidingObject)
 Override this to define what happens when your playable character enters something.
virtual void CollisionExit (GameObject collidingObject)
 Override this to define what happens when your playable character exits something.
virtual void TriggerEnter (GameObject collidingObject)
 Override this to define what happens when your playable character enters a trigger.
virtual void TriggerExit (GameObject collidingObject)
 Override this to define what happens when your playable character exits a trigger.

Protected Attributes

float Frequency =2f
 the frequency at which the albatross completes a low/high/low cycle
Vector3 _originalPosition
float _randomVariation
Protected Attributes inherited from MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement
float _movementLeft
float _movementRight
float _movement
float _currentMovement = 0
Vector3 _newPosition
float _minBound
float _maxBound
float _boundsSecurity = 10f
Vector3 _movementAxis
Protected Attributes inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
Vector3 _initialPosition
bool _grounded
MMRigidbodyInterface _rigidbodyInterface
Animator _animator
float _distanceToTheGroundRaycastLength = 50f
GameObject _ground
LayerMask _collisionMaskSave
float _awakeAt
Vector3 _raycastLeftOrigin
Vector3 _raycastRightOrigin

Additional Inherited Members

Public Types inherited from MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement
enum  PossibleMovementAxis { X , Y , Z }
 the possible axis for your character to move on More...
Public Member Functions inherited from MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement
override void LeftStart ()
 When the player presses left, we apply a negative movement.
virtual void LeftButtonPressed ()
override void LeftEnd ()
 When the player stops pressing left, we reset our movement.
override void RightStart ()
 When the player presses right, we apply a positive movement.
virtual void RightButtonPressed ()
override void RightEnd ()
 When the player stops pressing right, we reset our movement.
Public Member Functions inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
virtual void SetInitialPosition (Vector3 initialPosition)
 Use this to define the initial position of the agent. Used mainly for reset position purposes.
virtual void Disable ()
 Disables the playable character.
virtual void Die ()
 What happens when the object gets killed.
virtual void DisableCollisions ()
 Disables the collisions.
virtual void EnableCollisions ()
 Enables the collisions.
virtual void MainActionStart ()
 What happens when the main action button button is pressed.
virtual void MainActionEnd ()
 What happens when the main action button button is released.
virtual void MainActionOngoing ()
 What happens when the main action button button is being pressed.
virtual void DownStart ()
 What happens when the down button is pressed.
virtual void DownEnd ()
 What happens when the down button is released.
virtual void DownOngoing ()
 What happens when the down button is being pressed.
virtual void UpStart ()
 What happens when the up button is pressed.
virtual void UpEnd ()
 What happens when the up button is released.
virtual void UpOngoing ()
 What happens when the up button is being pressed.
virtual void LeftOngoing ()
 What happens when the left button is being pressed.
virtual void RightOngoing ()
 What happens when the right button is being pressed.
Properties inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
float DistanceToTheGround [get, protected set]
 the distance between the character and the ground
bool Invincible [get]

Detailed Description

The character controller for the main character in the Flight of the Albatross demo scene.

Member Function Documentation

◆ HandleAlbatrossMovement()

virtual void MoreMountains.InfiniteRunnerEngine.AlbatrossController.HandleAlbatrossMovement ( )
protectedvirtual

Handles the albatross movement.

◆ Start()

override void MoreMountains.InfiniteRunnerEngine.AlbatrossController.Start ( )
protectedvirtual

On Start, we get a random variation for the albatross movement.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ Update()

override void MoreMountains.InfiniteRunnerEngine.AlbatrossController.Update ( )
protectedvirtual

On update we just handle our character's movement.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

Member Data Documentation

◆ _originalPosition

Vector3 MoreMountains.InfiniteRunnerEngine.AlbatrossController._originalPosition
protected

◆ _randomVariation

float MoreMountains.InfiniteRunnerEngine.AlbatrossController._randomVariation
protected

◆ AlbatrossBody

GameObject MoreMountains.InfiniteRunnerEngine.AlbatrossController.AlbatrossBody

the gameobject containing the albatross model, used for rotation without affecting the boxcollider

◆ Frequency

float MoreMountains.InfiniteRunnerEngine.AlbatrossController.Frequency =2f
protected

the frequency at which the albatross completes a low/high/low cycle

◆ MaximumAlbatrossRotation

float MoreMountains.InfiniteRunnerEngine.AlbatrossController.MaximumAlbatrossRotation = 45f

the maximum angle, in degrees, at which the albatross can rotate


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