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

Add this class to an object and it'll move in parallax based on the level's speed. This method moves the texture, not the object. It doesn't work for non-2D objects. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.ParallaxOffset:

Public Attributes

float Speed = 0
 the relative speed of the object

Static Public Attributes

static ParallaxOffset CurrentParallaxOffset

Protected Member Functions

virtual void Start ()
 On start, we store the current offset.
virtual void Update ()
 On update, we apply the offset to the texture.

Protected Attributes

RawImage _rawImage
Renderer _renderer
Vector2 _newOffset
float _position = 0
float yOffset

Detailed Description

Add this class to an object and it'll move in parallax based on the level's speed. This method moves the texture, not the object. It doesn't work for non-2D objects.

Member Function Documentation

◆ Start()

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

On start, we store the current offset.

◆ Update()

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

On update, we apply the offset to the texture.

Member Data Documentation

◆ _newOffset

Vector2 MoreMountains.InfiniteRunnerEngine.ParallaxOffset._newOffset
protected

◆ _position

float MoreMountains.InfiniteRunnerEngine.ParallaxOffset._position = 0
protected

◆ _rawImage

RawImage MoreMountains.InfiniteRunnerEngine.ParallaxOffset._rawImage
protected

◆ _renderer

Renderer MoreMountains.InfiniteRunnerEngine.ParallaxOffset._renderer
protected

◆ CurrentParallaxOffset

ParallaxOffset MoreMountains.InfiniteRunnerEngine.ParallaxOffset.CurrentParallaxOffset
static

◆ Speed

float MoreMountains.InfiniteRunnerEngine.ParallaxOffset.Speed = 0

the relative speed of the object

◆ yOffset

float MoreMountains.InfiniteRunnerEngine.ParallaxOffset.yOffset
protected

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