Infinite Runner Engine v1.9
Public Types | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.Parallax Class Reference

Add this class to an object so it'll move in parallax based on the level's speed. Note that this method duplicates the object More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.Parallax:
MoreMountains.Tools.MMObjectBounds

Public Types

enum  PossibleDirections {
  Left , Right , Up , Down ,
  Forwards , Backwards
}
 
- Public Types inherited from MoreMountains.Tools.MMObjectBounds
enum  WaysToDetermineBounds { Collider , Collider2D , Renderer , Undefined }
 

Public Attributes

float ParallaxSpeed =0
 the relative speed of the object More...
 
PossibleDirections ParallaxDirection = PossibleDirections.Left
 
- Public Attributes inherited from MoreMountains.Tools.MMObjectBounds
WaysToDetermineBounds BoundsBasedOn
 

Protected Member Functions

virtual void Start ()
 On start, we store various variables and clone the object More...
 
virtual void Update ()
 On Update, we move the object and its clone More...
 
virtual bool ShouldResetPosition ()
 
- Protected Member Functions inherited from MoreMountains.Tools.MMObjectBounds
virtual void Reset ()
 When this component is added we define its bounds. More...
 
virtual void DefineBoundsChoice ()
 Tries to determine automatically what the bounds should be based on. In this order, it'll keep the last found of these : Collider2D, Collider or Renderer. If none of these is found, it'll be set as Undefined. More...
 

Protected Attributes

GameObject _clone
 
Vector3 _movement
 
Vector3 _initialPosition
 
Vector3 _newPosition
 
Vector3 _direction
 
float _width
 

Additional Inherited Members

- Public Member Functions inherited from MoreMountains.Tools.MMObjectBounds
virtual Bounds GetBounds ()
 Returns the bounds of the object, based on what has been defined More...
 
- Properties inherited from MoreMountains.Tools.MMObjectBounds
Vector3 Size [getset]
 

Detailed Description

Add this class to an object so it'll move in parallax based on the level's speed. Note that this method duplicates the object

Member Enumeration Documentation

◆ PossibleDirections

Enumerator
Left 
Right 
Up 
Down 
Forwards 
Backwards 

Member Function Documentation

◆ ShouldResetPosition()

virtual bool MoreMountains.InfiniteRunnerEngine.Parallax.ShouldResetPosition ( )
protectedvirtual

◆ Start()

virtual void MoreMountains.InfiniteRunnerEngine.Parallax.Start ( )
protectedvirtual

On start, we store various variables and clone the object

◆ Update()

virtual void MoreMountains.InfiniteRunnerEngine.Parallax.Update ( )
protectedvirtual

On Update, we move the object and its clone

Member Data Documentation

◆ _clone

GameObject MoreMountains.InfiniteRunnerEngine.Parallax._clone
protected

◆ _direction

Vector3 MoreMountains.InfiniteRunnerEngine.Parallax._direction
protected

◆ _initialPosition

Vector3 MoreMountains.InfiniteRunnerEngine.Parallax._initialPosition
protected

◆ _movement

Vector3 MoreMountains.InfiniteRunnerEngine.Parallax._movement
protected

◆ _newPosition

Vector3 MoreMountains.InfiniteRunnerEngine.Parallax._newPosition
protected

◆ _width

float MoreMountains.InfiniteRunnerEngine.Parallax._width
protected

◆ ParallaxDirection

PossibleDirections MoreMountains.InfiniteRunnerEngine.Parallax.ParallaxDirection = PossibleDirections.Left

◆ ParallaxSpeed

float MoreMountains.InfiniteRunnerEngine.Parallax.ParallaxSpeed =0

the relative speed of the object


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