Corgi Engine  v9.1
MoreMountains.CorgiEngine.LevelBackground Class Reference

Add this class to a background image so it will act as your level's background More...

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

Public Member Functions

virtual void StartFollowing ()
 Lets the background follow its camera More...
 
virtual void StopFollowing ()
 Prevents the background from following the camera More...
 
virtual void SetZOffset (float newOffset)
 Applies a new z offset for the background More...
 

Public Attributes

bool Following = true
 if this is true, the background will be following the camera More...
 
Vector3 BackgroundOffset = Vector3.zero
 the offset to apply relative to the camera More...
 
bool StartFollowingBtn
 test button to start following the camera More...
 
bool StopFollowingBtn
 test button to stop following the camera More...
 

Protected Member Functions

virtual void OnEnable ()
 On enable, we get the main camera More...
 

Protected Attributes

Transform _initialParent
 
float _initialOffsetZ
 
bool _initialized = false
 

Detailed Description

Add this class to a background image so it will act as your level's background

Member Function Documentation

◆ OnEnable()

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

On enable, we get the main camera

◆ SetZOffset()

virtual void MoreMountains.CorgiEngine.LevelBackground.SetZOffset ( float  newOffset)
virtual

Applies a new z offset for the background

Parameters
newOffset

◆ StartFollowing()

virtual void MoreMountains.CorgiEngine.LevelBackground.StartFollowing ( )
virtual

Lets the background follow its camera

◆ StopFollowing()

virtual void MoreMountains.CorgiEngine.LevelBackground.StopFollowing ( )
virtual

Prevents the background from following the camera

Member Data Documentation

◆ _initialized

bool MoreMountains.CorgiEngine.LevelBackground._initialized = false
protected

◆ _initialOffsetZ

float MoreMountains.CorgiEngine.LevelBackground._initialOffsetZ
protected

◆ _initialParent

Transform MoreMountains.CorgiEngine.LevelBackground._initialParent
protected

◆ BackgroundOffset

Vector3 MoreMountains.CorgiEngine.LevelBackground.BackgroundOffset = Vector3.zero

the offset to apply relative to the camera

◆ Following

bool MoreMountains.CorgiEngine.LevelBackground.Following = true

if this is true, the background will be following the camera

◆ StartFollowingBtn

bool MoreMountains.CorgiEngine.LevelBackground.StartFollowingBtn

test button to start following the camera

◆ StopFollowingBtn

bool MoreMountains.CorgiEngine.LevelBackground.StopFollowingBtn

test button to stop following the camera


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