|
Infinite Runner Engine v2.2
|
You should extend this class for all your playable characters The asset includes a bunch of examples of how you can do that : Jumper, Flappy, Dragon, etc... More...
Public Member Functions | |
| 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 | 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 Attributes | |
| 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 | |
| virtual void | Awake () |
| Use this for initialization. | |
| virtual void | Start () |
| On start - Override this if needed. | |
| virtual void | Initialize () |
| This method initializes all essential elements. | |
| virtual void | Update () |
| 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 | |
| Vector3 | _initialPosition |
| bool | _grounded |
| MMRigidbodyInterface | _rigidbodyInterface |
| Animator | _animator |
| float | _distanceToTheGroundRaycastLength = 50f |
| GameObject | _ground |
| LayerMask | _collisionMaskSave |
| float | _awakeAt |
| Vector3 | _raycastLeftOrigin |
| Vector3 | _raycastRightOrigin |
Properties | |
| float | DistanceToTheGround [get, protected set] |
| the distance between the character and the ground | |
| bool | Invincible [get] |
You should extend this class for all your playable characters The asset includes a bunch of examples of how you can do that : Jumper, Flappy, Dragon, etc...
|
protectedvirtual |
Use this for initialization.
Reimplemented in MoreMountains.InfiniteRunnerEngine.Dragon, MoreMountains.InfiniteRunnerEngine.Flappy, and MoreMountains.InfiniteRunnerEngine.LaneRunner.
|
protectedvirtual |
Checks the death conditions.
|
protectedvirtual |
Override this to define what happens when your playable character enters something.
| collidingObject | Colliding object. |
Reimplemented in MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
protectedvirtual |
Override this to define what happens when your playable character exits something.
| collidingObject | Colliding object. |
|
protectedvirtual |
Determines the distance between the Jumper and the ground.
|
protectedvirtual |
Determines if grouded conditions are met.
true, if if grouded conditions are met was determined, false otherwise.
|
virtual |
What happens when the object gets killed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.CaveRacer, MoreMountains.InfiniteRunnerEngine.HillRider, and MoreMountains.InfiniteRunnerEngine.LaneRunner.
|
virtual |
Disables the playable character.
|
virtual |
Disables the collisions.
|
virtual |
What happens when the down button is released.
|
virtual |
What happens when the down button is being pressed.
|
virtual |
What happens when the down button is pressed.
|
virtual |
Enables the collisions.
|
protectedvirtual |
Gets the playable character bounds.
|
protectedvirtual |
This method initializes all essential elements.
Reimplemented in MoreMountains.InfiniteRunnerEngine.HillRider, and MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
virtual |
What happens when the left button is released.
Reimplemented in MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement.
|
virtual |
What happens when the left button is being pressed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.LeftRightMove.
|
virtual |
What happens when the left button is pressed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement, MoreMountains.InfiniteRunnerEngine.LaneRunner, and MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
virtual |
What happens when the main action button button is released.
Reimplemented in MoreMountains.InfiniteRunnerEngine.Flappy, MoreMountains.InfiniteRunnerEngine.Jumper, and MoreMountains.InfiniteRunnerEngine.Rocket.
|
virtual |
What happens when the main action button button is being pressed.
|
virtual |
What happens when the main action button button is pressed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.CaveRacer, MoreMountains.InfiniteRunnerEngine.Flappy, MoreMountains.InfiniteRunnerEngine.Jumper, and MoreMountains.InfiniteRunnerEngine.Rocket.
|
protectedvirtual |
Handles enter collision with 3D colliders.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles enter collision with 2D colliders.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles exit collision with 3D colliders.
| collidingObject | Other. |
|
protectedvirtual |
Handles exit collision with 2D colliders.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles enter collision with 2D triggers.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles enter collision with 2D triggers.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles enter collision with 2D triggers.
| collidingObject | Colliding object. |
|
protectedvirtual |
Handles enter collision with 2D triggers.
| collidingObject | Colliding object. |
|
protectedvirtual |
Called on update, tries to return the object to its initial position.
|
virtual |
What happens when the right button is released.
Reimplemented in MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement.
|
virtual |
What happens when the right button is being pressed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.LeftRightMove.
|
virtual |
What happens when the right button is pressed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement, MoreMountains.InfiniteRunnerEngine.LaneRunner, and MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
virtual |
Use this to define the initial position of the agent. Used mainly for reset position purposes.
| initialPosition | Initial position. |
|
protectedvirtual |
On start - Override this if needed.
Reimplemented in MoreMountains.InfiniteRunnerEngine.AlbatrossController, MoreMountains.InfiniteRunnerEngine.CaveRacer, MoreMountains.InfiniteRunnerEngine.Dragon, MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement, and MoreMountains.InfiniteRunnerEngine.Jumper.
|
protectedvirtual |
Override this to define what happens when your playable character enters a trigger.
| collidingObject | Colliding object. |
Reimplemented in MoreMountains.InfiniteRunnerEngine.CaveRacer.
|
protectedvirtual |
Override this to define what happens when your playable character exits a trigger.
| collidingObject | Colliding object. |
|
protectedvirtual |
Reimplemented in MoreMountains.InfiniteRunnerEngine.AlbatrossController, MoreMountains.InfiniteRunnerEngine.CaveRacer, MoreMountains.InfiniteRunnerEngine.Dragon, MoreMountains.InfiniteRunnerEngine.Flappy, MoreMountains.InfiniteRunnerEngine.FreeLeftToRightMovement, MoreMountains.InfiniteRunnerEngine.HillRider, MoreMountains.InfiniteRunnerEngine.Jumper, MoreMountains.InfiniteRunnerEngine.LaneRunner, MoreMountains.InfiniteRunnerEngine.LeftRightMove, MoreMountains.InfiniteRunnerEngine.Rocket, and MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
protectedvirtual |
Updates all mecanim animators.
Reimplemented in MoreMountains.InfiniteRunnerEngine.Dragon, MoreMountains.InfiniteRunnerEngine.Flappy, MoreMountains.InfiniteRunnerEngine.HillRider, MoreMountains.InfiniteRunnerEngine.Jumper, and MoreMountains.InfiniteRunnerEngine.VerticalCharacter.
|
protectedvirtual |
This is called at Update() and sets each of the animators parameters to their corresponding State values.
|
virtual |
What happens when the up button is released.
|
virtual |
What happens when the up button is being pressed.
|
virtual |
What happens when the up button is pressed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| float MoreMountains.InfiniteRunnerEngine.PlayableCharacter.GroundDistanceTolerance = 0.05f |
the distance tolerance at which a character is considered grounded
| float MoreMountains.InfiniteRunnerEngine.PlayableCharacter.InitialInvincibilityDuration = 3f |
the duration (in seconds) of invincibility on spawn
| float MoreMountains.InfiniteRunnerEngine.PlayableCharacter.ResetPositionSpeed = 0.5f |
| bool MoreMountains.InfiniteRunnerEngine.PlayableCharacter.ShouldResetPosition = true |
returns true if the character is currently grounded
| bool MoreMountains.InfiniteRunnerEngine.PlayableCharacter.UseDefaultMecanim = true |
should we use the default mecanim ?
|
getprotected set |
the distance between the character and the ground
|
get |