Corgi Engine  v8.8
MoreMountains.CorgiEngine.ParallaxElement Class Reference

Add this to a GameObject to have it move in parallax More...

Inheritance diagram for MoreMountains.CorgiEngine.ParallaxElement:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

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
 

Detailed Description

Add this to a GameObject to have it move in parallax

Member Enumeration Documentation

◆ UpdateModes

the possible ticks at which this parallax element can update at

Enumerator
Update 
LateUpdate 
FixedUpdate 

Member Function Documentation

◆ FixedUpdate()

virtual void MoreMountains.CorgiEngine.ParallaxElement.FixedUpdate ( )
protectedvirtual

On fixed update, we process our movement if needed

◆ LateUpdate()

virtual void MoreMountains.CorgiEngine.ParallaxElement.LateUpdate ( )
protectedvirtual

On late update, we process our movement if needed

◆ OnEnable()

virtual void MoreMountains.CorgiEngine.ParallaxElement.OnEnable ( )
protectedvirtual

Initialization

◆ ProcessParallax()

virtual void MoreMountains.CorgiEngine.ParallaxElement.ProcessParallax ( )
protectedvirtual

Every frame, we move the parallax layer according to the camera's position

◆ Update()

virtual void MoreMountains.CorgiEngine.ParallaxElement.Update ( )
protectedvirtual

On update, we process our movement if needed

Member Data Documentation

◆ _camera

Camera MoreMountains.CorgiEngine.ParallaxElement._camera
protected

◆ _cameraTransform

Transform MoreMountains.CorgiEngine.ParallaxElement._cameraTransform
protected

◆ _difference

Vector3 MoreMountains.CorgiEngine.ParallaxElement._difference
protected

◆ _parallaxCamera

ParallaxCamera MoreMountains.CorgiEngine.ParallaxElement._parallaxCamera
protected

◆ _previousCameraPosition

Vector3 MoreMountains.CorgiEngine.ParallaxElement._previousCameraPosition
protected

◆ _previousMoveParallax

bool MoreMountains.CorgiEngine.ParallaxElement._previousMoveParallax
protected

◆ _speed

Vector3 MoreMountains.CorgiEngine.ParallaxElement._speed
protected

◆ HorizontalSpeed

float MoreMountains.CorgiEngine.ParallaxElement.HorizontalSpeed

horizontal speed of the layer

◆ MoveInOppositeDirection

bool MoreMountains.CorgiEngine.ParallaxElement.MoveInOppositeDirection = true

defines if the layer moves in the same direction as the camera or not

◆ UpdateMode

UpdateModes MoreMountains.CorgiEngine.ParallaxElement.UpdateMode = UpdateModes.LateUpdate

the selected update mode that will determine at which tick this parallax element will run

◆ VerticalSpeed

float MoreMountains.CorgiEngine.ParallaxElement.VerticalSpeed

vertical speed of the layer


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