Corgi Engine
v9.0
|
Add this to a GameObject to have it move in parallax More...
Public Types | |
enum | UpdateModes { UpdateModes.Update, UpdateModes.LateUpdate, UpdateModes.FixedUpdate } |
the possible ticks at which this parallax element can update at More... | |
Public Attributes | |
UpdateModes | UpdateMode = UpdateModes.LateUpdate |
the selected update mode that will determine at which tick this parallax element will run More... | |
float | HorizontalSpeed |
horizontal speed of the layer More... | |
float | VerticalSpeed |
vertical speed of the layer More... | |
bool | MoveInOppositeDirection = true |
defines if the layer moves in the same direction as the camera or not More... | |
Protected Member Functions | |
virtual void | OnEnable () |
Initialization More... | |
virtual void | FixedUpdate () |
On fixed update, we process our movement if needed More... | |
virtual void | Update () |
On update, we process our movement if needed More... | |
virtual void | LateUpdate () |
On late update, we process our movement if needed More... | |
virtual void | ProcessParallax () |
Every frame, we move the parallax layer according to the camera's position More... | |
Protected Attributes | |
Vector3 | _previousCameraPosition |
bool | _previousMoveParallax |
ParallaxCamera | _parallaxCamera |
Camera | _camera |
Transform | _cameraTransform |
Vector3 | _difference |
Vector3 | _speed |
Add this to a GameObject to have it move in parallax
|
protectedvirtual |
On fixed update, we process our movement if needed
|
protectedvirtual |
On late update, we process our movement if needed
|
protectedvirtual |
Initialization
|
protectedvirtual |
Every frame, we move the parallax layer according to the camera's position
|
protectedvirtual |
On update, we process our movement if needed
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.CorgiEngine.ParallaxElement.HorizontalSpeed |
horizontal speed of the layer
bool MoreMountains.CorgiEngine.ParallaxElement.MoveInOppositeDirection = true |
defines if the layer moves in the same direction as the camera or not
UpdateModes MoreMountains.CorgiEngine.ParallaxElement.UpdateMode = UpdateModes.LateUpdate |
the selected update mode that will determine at which tick this parallax element will run
float MoreMountains.CorgiEngine.ParallaxElement.VerticalSpeed |
vertical speed of the layer