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

Add this class to an object and it'll move according to the level's speed. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.MovingObject:

Public Member Functions

virtual void Move ()
 
virtual void SetDirection (Vector3 newDirection)
 

Public Attributes

float Speed =0
 the speed of the object (relative to the level's speed) More...
 
float Acceleration = 0
 the acceleration of the object over time. Starts accelerating on enable. More...
 
Vector3 Direction = Vector3.left
 the current direction of the object More...
 
bool DirectionCanBeChangedBySpawner = true
 if set to true, the spawner can change the direction of the object. If not the one set in its inspector will be used. More...
 
Space MovementSpace = Space.World
 the space this object moves into, either world or local More...
 

Protected Member Functions

virtual void Awake ()
 On awake, we store the initial speed of the object More...
 
virtual void OnEnable ()
 On enable, we reset the object's speed More...
 
virtual void Update ()
 

Protected Attributes

Vector3 _movement
 
float _initialSpeed
 

Properties

Vector3 Movement [get]
 

Detailed Description

Add this class to an object and it'll move according to the level's speed.

Member Function Documentation

◆ Awake()

virtual void MoreMountains.InfiniteRunnerEngine.MovingObject.Awake ( )
protectedvirtual

On awake, we store the initial speed of the object

◆ Move()

virtual void MoreMountains.InfiniteRunnerEngine.MovingObject.Move ( )
virtual

◆ OnEnable()

virtual void MoreMountains.InfiniteRunnerEngine.MovingObject.OnEnable ( )
protectedvirtual

On enable, we reset the object's speed

◆ SetDirection()

virtual void MoreMountains.InfiniteRunnerEngine.MovingObject.SetDirection ( Vector3  newDirection)
virtual

◆ Update()

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

Member Data Documentation

◆ _initialSpeed

float MoreMountains.InfiniteRunnerEngine.MovingObject._initialSpeed
protected

◆ _movement

Vector3 MoreMountains.InfiniteRunnerEngine.MovingObject._movement
protected

◆ Acceleration

float MoreMountains.InfiniteRunnerEngine.MovingObject.Acceleration = 0

the acceleration of the object over time. Starts accelerating on enable.

◆ Direction

Vector3 MoreMountains.InfiniteRunnerEngine.MovingObject.Direction = Vector3.left

the current direction of the object

◆ DirectionCanBeChangedBySpawner

bool MoreMountains.InfiniteRunnerEngine.MovingObject.DirectionCanBeChangedBySpawner = true

if set to true, the spawner can change the direction of the object. If not the one set in its inspector will be used.

◆ MovementSpace

Space MoreMountains.InfiniteRunnerEngine.MovingObject.MovementSpace = Space.World

the space this object moves into, either world or local

◆ Speed

float MoreMountains.InfiniteRunnerEngine.MovingObject.Speed =0

the speed of the object (relative to the level's speed)

Property Documentation

◆ Movement

Vector3 MoreMountains.InfiniteRunnerEngine.MovingObject.Movement
get

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