Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.PlatformCamera Class Reference

Base class for all platformer cameras. More...

Inheritance diagram for PlatformerPro.PlatformCamera:
PlatformerPro.PlatformerProMonoBehaviour PlatformerPro.PlatformerProStandardCamera

Public Member Functions

virtual void Init ()
 Initialise this instance. More...
 
virtual void ChangeZone (CameraZone newZone, Character triggeringCharacter=null)
 Changes the zone by immediately snapping to the new zones position. More...
 
- Public Member Functions inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual void Validate (PlatformerProMonoBehaviour myTarget)
 Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More...
 

Public Attributes

bool isDefaultCamera
 Set to true if this is the default camera. More...
 
CameraZone startingZone
 The starting zone. More...
 
System.EventHandler< CameraZoneChangeEventArgsCameraZoneChanged
 Event sent when the camera zone changes. This event is sent when the zone change starts. Add a handler to the tweener to listen to the zone change end for a change that is not instantaneous (or delay your event response). More...
 

Protected Member Functions

virtual void OnCameraZoneChanged (CameraZone oldZone, CameraZone newZone)
 Send the Camera Zone changed event. More...
 
virtual void DoDestroy ()
 Do the destroy actions. More...
 

Static Protected Member Functions

static void AddCamera (PlatformCamera platformCamera)
 Adds a camera to the global list. More...
 
static void RemoveCamera (PlatformCamera platformCamera)
 Removes a camera from the global list. More...
 
static void SetDefaultCamera ()
 Sets the main camera. More...
 

Protected Attributes

CameraZone currentZone
 The current zone. More...
 
Camera myCamera
 Cached reference to the associated Unity camera. More...
 

Static Protected Attributes

static List< PlatformCameraallCameras
 A list of all camera. More...
 
static PlatformCamera defaultCamera
 The main or default camera. More...
 

Properties

CameraZone CurrentZone [get, set]
 Gets the current zone. More...
 
static PlatformCamera DefaultCamera [get]
 Gets the default camera. More...
 
static PlatformCamera[] AllCameras [get]
 Gets the default camera. More...
 
- Properties inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual string Header [get]
 Gets the header string used to describe the component. More...
 
virtual string DocLink [get]
 Gets a link to documentation site. More...
 
virtual string VideoLink [get]
 Gets a link to a youtube video. More...
 
virtual string Deprecated [get]
 If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More...
 

Detailed Description

Base class for all platformer cameras.

Member Function Documentation

◆ AddCamera()

static void PlatformerPro.PlatformCamera.AddCamera ( PlatformCamera  platformCamera)
staticprotected

Adds a camera to the global list.

Parameters
platformCameraPlatform camera.

◆ ChangeZone()

virtual void PlatformerPro.PlatformCamera.ChangeZone ( CameraZone  newZone,
Character  triggeringCharacter = null 
)
virtual

Changes the zone by immediately snapping to the new zones position.

Parameters
newZoneThe zone to move to.
triggeringCharacterCharacter that triggered the transition./param>

Reimplemented in PlatformerPro.PlatformerProStandardCamera.

◆ DoDestroy()

virtual void PlatformerPro.PlatformCamera.DoDestroy ( )
protectedvirtual

Do the destroy actions.

Reimplemented in PlatformerPro.PlatformerProStandardCamera.

◆ Init()

virtual void PlatformerPro.PlatformCamera.Init ( )
virtual

Initialise this instance.

Reimplemented in PlatformerPro.PlatformerProStandardCamera.

◆ OnCameraZoneChanged()

virtual void PlatformerPro.PlatformCamera.OnCameraZoneChanged ( CameraZone  oldZone,
CameraZone  newZone 
)
protectedvirtual

Send the Camera Zone changed event.

Parameters
oldZone
newZone

◆ RemoveCamera()

static void PlatformerPro.PlatformCamera.RemoveCamera ( PlatformCamera  platformCamera)
staticprotected

Removes a camera from the global list.

Parameters
platformCameraPlatform camera.

◆ SetDefaultCamera()

static void PlatformerPro.PlatformCamera.SetDefaultCamera ( )
staticprotected

Sets the main camera.

Member Data Documentation

◆ allCameras

List<PlatformCamera> PlatformerPro.PlatformCamera.allCameras
staticprotected

A list of all camera.

◆ CameraZoneChanged

System.EventHandler<CameraZoneChangeEventArgs> PlatformerPro.PlatformCamera.CameraZoneChanged

Event sent when the camera zone changes. This event is sent when the zone change starts. Add a handler to the tweener to listen to the zone change end for a change that is not instantaneous (or delay your event response).

◆ currentZone

CameraZone PlatformerPro.PlatformCamera.currentZone
protected

The current zone.

◆ defaultCamera

PlatformCamera PlatformerPro.PlatformCamera.defaultCamera
staticprotected

The main or default camera.

◆ isDefaultCamera

bool PlatformerPro.PlatformCamera.isDefaultCamera

Set to true if this is the default camera.

◆ myCamera

Camera PlatformerPro.PlatformCamera.myCamera
protected

Cached reference to the associated Unity camera.

◆ startingZone

CameraZone PlatformerPro.PlatformCamera.startingZone

The starting zone.

Property Documentation

◆ AllCameras

PlatformCamera [] PlatformerPro.PlatformCamera.AllCameras
staticget

Gets the default camera.

◆ CurrentZone

CameraZone PlatformerPro.PlatformCamera.CurrentZone
getset

Gets the current zone.

◆ DefaultCamera

PlatformCamera PlatformerPro.PlatformCamera.DefaultCamera
staticget

Gets the default camera.


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