Loading...
Searching...
No Matches
CityBuilderCore.IMainCamera Interface Reference

Detailed Description

interface used to give acccess to various main camera related things through the dependency system
for example bars that display icons(BuildingItemsBar) have to align the icon with the main cam

Inheritance diagram for CityBuilderCore.IMainCamera:
CityBuilderCore.CameraController

Public Member Functions

void SetCulling (LayerMask layerMask)
 sets the culling of the main camera to the passed mask
the original mask is saved so it can be restored using ResetCulling
 
void ResetCulling ()
 resets the culling on the main camera to its original layer mask after is has been changed by SetCulling(LayerMask)
 
CoroutineToken Jump (Vector3 position, Quaternion? rotation=null)
 quickly moves the camera to a position on the map
for example to focus on some happening
 
CoroutineToken Follow (Transform leader)
 moves the camera to a transform and follows it
following is canceled when the user moves the camera or the transform becomes inactive
 

Properties

Camera Camera [get]
 the main camera of the game
 
Vector3 Position [get, set]
 position the camera point to on the map, not the position of the camera itself
 
Quaternion Rotation [get, set]
 current rotation of the main camera(used only to persist camera rotation currently), only applies in 3d
 
float Size [get, set]
 current size of the main camera(used only to persist camera size currently)
 

Member Function Documentation

◆ Follow()

CoroutineToken CityBuilderCore.IMainCamera.Follow ( Transform leader)

moves the camera to a transform and follows it
following is canceled when the user moves the camera or the transform becomes inactive

Parameters
leaderthe transform the camera should follow

Implemented in CityBuilderCore.CameraController.

◆ Jump()

CoroutineToken CityBuilderCore.IMainCamera.Jump ( Vector3 position,
Quaternion? rotation = null )

quickly moves the camera to a position on the map
for example to focus on some happening

Parameters
positionthe absolute position on the map
rotationoptional rotation the camera should have

Implemented in CityBuilderCore.CameraController.

◆ ResetCulling()

void CityBuilderCore.IMainCamera.ResetCulling ( )

resets the culling on the main camera to its original layer mask after is has been changed by SetCulling(LayerMask)

Implemented in CityBuilderCore.CameraController.

◆ SetCulling()

void CityBuilderCore.IMainCamera.SetCulling ( LayerMask layerMask)

sets the culling of the main camera to the passed mask
the original mask is saved so it can be restored using ResetCulling

Parameters
layerMaskthe layer mask to set on the main camera

Implemented in CityBuilderCore.CameraController.

Property Documentation

◆ Position

Vector3 CityBuilderCore.IMainCamera.Position
getset

position the camera point to on the map, not the position of the camera itself

Implemented in CityBuilderCore.CameraController.

◆ Rotation

Quaternion CityBuilderCore.IMainCamera.Rotation
getset

current rotation of the main camera(used only to persist camera rotation currently), only applies in 3d

Implemented in CityBuilderCore.CameraController.

◆ Size

float CityBuilderCore.IMainCamera.Size
getset

current size of the main camera(used only to persist camera size currently)

Implemented in CityBuilderCore.CameraController.