Terrain Engine 2D  1.10
A 2D Block Engine
TerrainEngine2D.CameraController Class Reference

Basic camera controller for camera movement More...

Inheritance diagram for TerrainEngine2D.CameraController:
TerrainEngine2D.MonoBehaviourSingleton< CameraController >

Public Types

enum  Followtype { Followtype.None, Followtype.Permanent, Followtype.Focus }
 

Public Member Functions

void FollowObject (Transform objectTransform, Followtype followType)
 Follow a specified transform More...
 
void FollowObject (Transform objectTransform, Followtype followType, Vector2 objectCameraOffset)
 Follow a specified transform with a camera offset More...
 
void FollowObject (Transform objectTransform, Followtype followType, float cameraZoom)
 Follow a specified transform More...
 
void FollowObject (Transform objectTransform, Followtype followType, float cameraZoom, Vector2 objectCameraOffset)
 Follow a specified transform with a camera offset More...
 
void StopFollowingObject ()
 Stop following the object More...
 

Protected Member Functions

override void Awake ()
 

Additional Inherited Members

- Properties inherited from TerrainEngine2D.MonoBehaviourSingleton< CameraController >
static T Instance [get]
 

Detailed Description

Basic camera controller for camera movement

Member Enumeration Documentation

◆ Followtype

Enumerator
None 
Permanent 
Focus 

Member Function Documentation

◆ Awake()

override void TerrainEngine2D.CameraController.Awake ( )
protectedvirtual

◆ FollowObject() [1/4]

void TerrainEngine2D.CameraController.FollowObject ( Transform  objectTransform,
Followtype  followType 
)

Follow a specified transform

Parameters
objectTransformThe transform to follow
followTypeThe type of following

◆ FollowObject() [2/4]

void TerrainEngine2D.CameraController.FollowObject ( Transform  objectTransform,
Followtype  followType,
Vector2  objectCameraOffset 
)

Follow a specified transform with a camera offset

Parameters
objectTransformThe transform to follow
followTypeThe type of following
objectCameraOffsetThe offset for the camera

◆ FollowObject() [3/4]

void TerrainEngine2D.CameraController.FollowObject ( Transform  objectTransform,
Followtype  followType,
float  cameraZoom 
)

Follow a specified transform

Parameters
objectTransformThe transform to follow
followTypeThe type of following
cameraZoomZoom to set the camera to

◆ FollowObject() [4/4]

void TerrainEngine2D.CameraController.FollowObject ( Transform  objectTransform,
Followtype  followType,
float  cameraZoom,
Vector2  objectCameraOffset 
)

Follow a specified transform with a camera offset

Parameters
objectTransformThe transform to follow
followTypeThe type of following
cameraZoomZoom to set the camera to
objectCameraOffsetThe offset for the camera

◆ StopFollowingObject()

void TerrainEngine2D.CameraController.StopFollowingObject ( )

Stop following the object


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