Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.VerticalCharacter Class Reference
Inheritance diagram for MoreMountains.InfiniteRunnerEngine.VerticalCharacter:
MoreMountains.InfiniteRunnerEngine.Jumper MoreMountains.InfiniteRunnerEngine.PlayableCharacter

Public Member Functions

override void LeftStart ()
 Triggered when the player presses left More...
 
override void RightStart ()
 Triggered when the player presses right More...
 
override void Jump ()
 
- Public Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Jumper
override void MainActionStart ()
 What happens when the main action button button is pressed More...
 
override void MainActionEnd ()
 What happens when the main action button button is released More...
 
virtual IEnumerator JumpSlow ()
 Slows the player's jump More...
 
- 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 More...
 
virtual void Disable ()
 Disables the playable character More...
 
virtual void Die ()
 What happens when the object gets killed More...
 
virtual void DisableCollisions ()
 Disables the collisions. More...
 
virtual void EnableCollisions ()
 Enables the collisions. More...
 
virtual void MainActionOngoing ()
 What happens when the main action button button is being pressed More...
 
virtual void DownStart ()
 What happens when the down button is pressed More...
 
virtual void DownEnd ()
 What happens when the down button is released More...
 
virtual void DownOngoing ()
 What happens when the down button is being pressed More...
 
virtual void UpStart ()
 What happens when the up button is pressed More...
 
virtual void UpEnd ()
 What happens when the up button is released More...
 
virtual void UpOngoing ()
 What happens when the up button is being pressed More...
 
virtual void LeftEnd ()
 What happens when the left button is released More...
 
virtual void LeftOngoing ()
 What happens when the left button is being pressed More...
 
virtual void RightEnd ()
 What happens when the right button is released More...
 
virtual void RightOngoing ()
 What happens when the right button is being pressed More...
 

Public Attributes

float Acceleration = 100f
 
float MaxSpeed = 8f
 
- Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.Jumper
float JumpForce = 20f
 the vertical force applied to the character when jumping More...
 
int NumberOfJumpsAllowed =2
 the number of jumps allowed More...
 
float CooldownBetweenJumps = 0f
 the minimum time (in seconds) allowed between two consecutive jumps More...
 
bool JumpsAllowedWhenGroundedOnly
 can the character jump only when grounded ? More...
 
float JumpReleaseSpeed = 50f
 the speed at which the character falls back down again when the jump button is released More...
 
bool JumpProportionalToPress = true
 if this is set to false, the jump height won't depend on the jump button release speed More...
 
float MinimalDelayBetweenJumps = 0.02f
 the minimal time, in seconds, that needs to have passed for a new jump to be authorized More...
 
float UngroundedDurationAfterJump = 0.2f
 a duration, after a jump, during which the character can't be considered grounded (to avoid jumps left to be reset too soon depending on context) More...
 
int _numberOfJumpsLeft
 
- Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
bool UseDefaultMecanim =true
 should we use the default mecanim ? More...
 
bool ShouldResetPosition = true
 returns true if the character is currently grounded More...
 
float ResetPositionSpeed = 0.5f
 
float GroundDistanceTolerance = 0.05f
 the distance tolerance at which a character is considered grounded More...
 
float InitialInvincibilityDuration = 3f
 the duration (in seconds) of invincibility on spawn More...
 

Protected Member Functions

override void Initialize ()
 On awake, we handle initialization More...
 
override void Update ()
 On update we handle the animator's update More...
 
virtual void FixedUpdate ()
 
virtual void FlipSprite ()
 
virtual void CharacterMovement ()
 
virtual void DetectWalls ()
 Determines the distance between the Jumper and the ground More...
 
override void CollisionEnter (GameObject collidingObject)
 Override this to define what happens when your playable character enters something More...
 
virtual void SetDirection (int newDirection)
 
virtual void PrepareJump ()
 
override void ApplyJumpForce ()
 
override void UpdateAllMecanimAnimators ()
 Updates all mecanim animators. More...
 
- Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Jumper
override void Start ()
 On Start() we initialize the last jump time More...
 
virtual void PerformJump ()
 
virtual bool EvaluateJumpConditions ()
 
- Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
virtual void Awake ()
 Use this for initialization More...
 
virtual void ComputeDistanceToTheGround ()
 Determines the distance between the Jumper and the ground More...
 
virtual bool DetermineIfGroudedConditionsAreMet ()
 Determines if grouded conditions are met. More...
 
virtual void CheckDeathConditions ()
 Checks the death conditions. More...
 
virtual Bounds GetPlayableCharacterBounds ()
 Gets the playable character bounds. More...
 
virtual void UpdateAnimator ()
 This is called at Update() and sets each of the animators parameters to their corresponding State values More...
 
virtual void ResetPosition ()
 Called on update, tries to return the object to its initial position More...
 
virtual void OnCollisionEnter2D (Collision2D collidingObject)
 Handles enter collision with 2D colliders More...
 
virtual void OnCollisionExit2D (Collision2D collidingObject)
 Handles exit collision with 2D colliders More...
 
virtual void OnCollisionEnter (Collision collidingObject)
 Handles enter collision with 3D colliders More...
 
virtual void OnCollisionExit (Collision collidingObject)
 Handles exit collision with 3D colliders More...
 
virtual void OnTriggerEnter2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers More...
 
virtual void OnTriggerExit2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers More...
 
virtual void OnTriggerEnter (Collider collidingObject)
 Handles enter collision with 2D triggers More...
 
virtual void OnTriggerExit (Collider collidingObject)
 Handles enter collision with 2D triggers More...
 
virtual void CollisionExit (GameObject collidingObject)
 Override this to define what happens when your playable character exits something More...
 
virtual void TriggerEnter (GameObject collidingObject)
 Override this to define what happens when your playable character enters a trigger More...
 
virtual void TriggerExit (GameObject collidingObject)
 Override this to define what happens when your playable character exits a trigger More...
 

Protected Attributes

bool _verticalGrounded = false
 
int _direction = 0
 
MovingObject _groundStorage
 
Vector3 _newMovement
 
Vector3 _jumpForce
 
SpriteRenderer _spriteRenderer
 
bool _collidingLeft = false
 
bool _collidingRight = false
 
bool _wallsliding = false
 
- Protected Attributes inherited from MoreMountains.InfiniteRunnerEngine.Jumper
bool _jumping =false
 
float _lastJumpTime
 
- 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
 

Static Protected Attributes

const float _wallRaycastLength = 0.5f
 

Additional Inherited Members

- Properties inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
float DistanceToTheGround [getprotected set]
 the distance between the character and the ground More...
 
bool Invincible [get]
 

Member Function Documentation

◆ ApplyJumpForce()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.ApplyJumpForce ( )
protectedvirtual

◆ CharacterMovement()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.CharacterMovement ( )
protectedvirtual

◆ CollisionEnter()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.CollisionEnter ( GameObject  collidingObject)
protectedvirtual

Override this to define what happens when your playable character enters something

Parameters
collidingObjectColliding object.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ DetectWalls()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.DetectWalls ( )
protectedvirtual

Determines the distance between the Jumper and the ground

◆ FixedUpdate()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.FixedUpdate ( )
protectedvirtual

◆ FlipSprite()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.FlipSprite ( )
protectedvirtual

◆ Initialize()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.Initialize ( )
protectedvirtual

On awake, we handle initialization

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ Jump()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.Jump ( )
virtual

◆ LeftStart()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.LeftStart ( )
virtual

Triggered when the player presses left

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ PrepareJump()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.PrepareJump ( )
protectedvirtual

◆ RightStart()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.RightStart ( )
virtual

Triggered when the player presses right

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ SetDirection()

virtual void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.SetDirection ( int  newDirection)
protectedvirtual

◆ Update()

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

On update we handle the animator's update

Reimplemented from MoreMountains.InfiniteRunnerEngine.Jumper.

◆ UpdateAllMecanimAnimators()

override void MoreMountains.InfiniteRunnerEngine.VerticalCharacter.UpdateAllMecanimAnimators ( )
protectedvirtual

Updates all mecanim animators.

Reimplemented from MoreMountains.InfiniteRunnerEngine.Jumper.

Member Data Documentation

◆ _collidingLeft

bool MoreMountains.InfiniteRunnerEngine.VerticalCharacter._collidingLeft = false
protected

◆ _collidingRight

bool MoreMountains.InfiniteRunnerEngine.VerticalCharacter._collidingRight = false
protected

◆ _direction

int MoreMountains.InfiniteRunnerEngine.VerticalCharacter._direction = 0
protected

◆ _groundStorage

MovingObject MoreMountains.InfiniteRunnerEngine.VerticalCharacter._groundStorage
protected

◆ _jumpForce

Vector3 MoreMountains.InfiniteRunnerEngine.VerticalCharacter._jumpForce
protected

◆ _newMovement

Vector3 MoreMountains.InfiniteRunnerEngine.VerticalCharacter._newMovement
protected

◆ _spriteRenderer

SpriteRenderer MoreMountains.InfiniteRunnerEngine.VerticalCharacter._spriteRenderer
protected

◆ _verticalGrounded

bool MoreMountains.InfiniteRunnerEngine.VerticalCharacter._verticalGrounded = false
protected

◆ _wallRaycastLength

const float MoreMountains.InfiniteRunnerEngine.VerticalCharacter._wallRaycastLength = 0.5f
staticprotected

◆ _wallsliding

bool MoreMountains.InfiniteRunnerEngine.VerticalCharacter._wallsliding = false
protected

◆ Acceleration

float MoreMountains.InfiniteRunnerEngine.VerticalCharacter.Acceleration = 100f

◆ MaxSpeed

float MoreMountains.InfiniteRunnerEngine.VerticalCharacter.MaxSpeed = 8f

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