Add this class to an object and it'll move according to the level's speed.
More...
|
| 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...
|
| |
|
| 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 () |
| |
Add this class to an object and it'll move according to the level's speed.
◆ 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 |
◆ _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)
◆ Movement
| Vector3 MoreMountains.InfiniteRunnerEngine.MovingObject.Movement |
|
get |
The documentation for this class was generated from the following file: