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

Extends playable character to implement the specific gameplay of the Dragon level. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.Dragon:
MoreMountains.InfiniteRunnerEngine.Flappy MoreMountains.InfiniteRunnerEngine.PlayableCharacter MoreMountains.Tools.MMEventListener< T > MoreMountains.Tools.MMEventListenerBase

Public Attributes

GameObject Flame
 the flame explosion triggered by the dragon at each jump
GameObject Explosion
 the explosion that happens when the dragon hits the ground
float StartImmunityDuration =3.5f
 the duration (in seconds) of the immunity at the start of each run
Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.Flappy
Vector3 FlapForce
 the force applied everytime the character flaps its wings
float CooldownBetweenFlaps = 0f
 the minimum time (in seconds) allowed between two consecutive jumps
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 Awake ()
 On awake, we initialize our stuff.
override void Start ()
 On start, we make our dragon flicker.
override void UpdateAllMecanimAnimators ()
 Updates all mecanim animators.
override void Update ()
 On update.
Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Flappy
override void Awake ()
 On awake, we initialize our stuff, and make sure the rigidbody is kinematic.
override void Update ()
 On update.
override void UpdateAllMecanimAnimators ()
 Updates all mecanim animators.
virtual void OnEnable ()
virtual void OnDisable ()
Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
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 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

Animator _flameAnimator
Animator _explosionAnimator
CameraBehavior _camera
Renderer _renderer
Protected Attributes inherited from MoreMountains.InfiniteRunnerEngine.Flappy
bool _jumping = false
float _lastFlapTime
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 Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Flappy
override void MainActionStart ()
 What happens when the main action button button is pressed.
override void MainActionEnd ()
 What happens when the main action button button is released.
virtual void GameStart ()
 Triggered when the GameStart event is triggered.
virtual void OnMMEvent (MMGameEvent gameEvent)
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 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 LeftStart ()
 What happens when the left button is pressed.
virtual void LeftEnd ()
 What happens when the left button is released.
virtual void LeftOngoing ()
 What happens when the left button is being pressed.
virtual void RightStart ()
 What happens when the right button is pressed.
virtual void RightEnd ()
 What happens when the right button is released.
virtual void RightOngoing ()
 What happens when the right button is being pressed.
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< T >
void OnMMEvent (T eventType)
Properties inherited from MoreMountains.InfiniteRunnerEngine.PlayableCharacter
float DistanceToTheGround [get, protected set]
 the distance between the character and the ground
bool Invincible [get]

Detailed Description

Extends playable character to implement the specific gameplay of the Dragon level.

Member Function Documentation

◆ Awake()

override void MoreMountains.InfiniteRunnerEngine.Dragon.Awake ( )
protectedvirtual

On awake, we initialize our stuff.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ Start()

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

On start, we make our dragon flicker.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

◆ Update()

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

◆ UpdateAllMecanimAnimators()

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

Updates all mecanim animators.

Reimplemented from MoreMountains.InfiniteRunnerEngine.PlayableCharacter.

Member Data Documentation

◆ _camera

CameraBehavior MoreMountains.InfiniteRunnerEngine.Dragon._camera
protected

◆ _explosionAnimator

Animator MoreMountains.InfiniteRunnerEngine.Dragon._explosionAnimator
protected

◆ _flameAnimator

Animator MoreMountains.InfiniteRunnerEngine.Dragon._flameAnimator
protected

◆ _renderer

Renderer MoreMountains.InfiniteRunnerEngine.Dragon._renderer
protected

◆ Explosion

GameObject MoreMountains.InfiniteRunnerEngine.Dragon.Explosion

the explosion that happens when the dragon hits the ground

◆ Flame

GameObject MoreMountains.InfiniteRunnerEngine.Dragon.Flame

the flame explosion triggered by the dragon at each jump

◆ StartImmunityDuration

float MoreMountains.InfiniteRunnerEngine.Dragon.StartImmunityDuration =3.5f

the duration (in seconds) of the immunity at the start of each run


The documentation for this class was generated from the following file:
  • Assets/InfiniteRunnerEngine/Demos/BackwardsDragon/Scripts/Dragon.cs