|
Infinite Runner Engine v2.2
|
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...
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 | |
| 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. | |
| virtual void | Update () |
| On Update, we move the object and its clone. | |
| virtual bool | ShouldResetPosition () |
| Protected Member Functions inherited from MoreMountains.Tools.MMObjectBounds | |
| virtual void | Reset () |
| When this component is added we define its bounds. | |
| 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. | |
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. | |
| Properties inherited from MoreMountains.Tools.MMObjectBounds | |
| virtual Vector3 | Size [get, set] |
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.
|
protectedvirtual |
|
protectedvirtual |
On start, we store various variables and clone the object.
|
protectedvirtual |
On Update, we move the object and its clone.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| PossibleDirections MoreMountains.InfiniteRunnerEngine.Parallax.ParallaxDirection = PossibleDirections.Left |
| float MoreMountains.InfiniteRunnerEngine.Parallax.ParallaxSpeed = 0 |
the relative speed of the object