FCV Engine 0.1
A tool and framework for tutorials in game development
Loading...
Searching...
No Matches
MovingPlatform Class Reference

A component to make an object move between determined positions with different options for movement types and speeds. More...

Inheritance diagram for MovingPlatform:

Private Member Functions

void Update ()
 Moves platform in a constant speed no matter the distance between current points.
 
void SetNextTarget ()
 Sets the next point for the moving platform to move towards and sets the length of the journey it is suppose to travel.
 
int GetNextIndex (int currentIndex, int arrayLength, LoopType movementType)
 Gets the next index on moving platform based on the movement type.
 

Detailed Description

A component to make an object move between determined positions with different options for movement types and speeds.

Definition at line 13 of file MovingPlatform.cs.

Member Function Documentation

◆ GetNextIndex()

int GetNextIndex ( int currentIndex,
int arrayLength,
LoopType movementType )
private

Gets the next index on moving platform based on the movement type.

Parameters
currentIndexcurrent index platform is going to
arrayLengthThe number of points in pointList
movementTypewhich type of movement is it (Loop, PingPong)
Returns
the next index platform should move to

Definition at line 109 of file MovingPlatform.cs.


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