![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
An area which the camera can be moved to and within. More...
Public Member Functions | |
bool | IsInZone (Transform t) |
Returns true if transform is in zone. More... | |
virtual Vector2 | Max (Camera camera) |
Gets the maximum bounds. More... | |
virtual Vector2 | Min (Camera camera) |
Gets the minimum bounds. More... | |
Vector3 | GetBestPositionForCharacter (Camera camera, Character character) |
![]() | |
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 | |
float | cameraZOffset |
The cameras Z offset from this zones transform. More... | |
float | width |
Width of the zone in world units. More... | |
float | height |
Height of the zone in world units. More... | |
bool | updateDynamically |
Color | zoneColor = new Color(0,0,1,0.05f) |
Color | outlineColor = new Color(0,0,1,0.25f) |
Static Public Attributes | |
static List< CameraZone > | cameraZones = new List<CameraZone>() |
Static list of all camera zones. More... | |
Protected Member Functions | |
virtual void | Init () |
Checks bounds make sense (i.e. are not too small to fit main camera) and then stores them. More... | |
Protected Attributes | |
Vector2 | min |
Vector2 | max |
bool | initialised |
Properties | |
bool | ZoneSmallerThanView [get, protected set] |
Track if the zone is smaller than camera viewport. If it is we wont snap to bounds. More... | |
virtual Vector3 | CameraPosition [get] |
Gets the position the camera should transition to. More... | |
virtual CameraZone | ActualZone [get] |
Gets the actual zone that the camera should be in. Could be different to this for example in the case of a Transition Point. More... | |
![]() | |
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... | |
An area which the camera can be moved to and within.
Vector3 PlatformerPro.CameraZone.GetBestPositionForCharacter | ( | Camera | camera, |
Character | character | ||
) |
|
protectedvirtual |
Checks bounds make sense (i.e. are not too small to fit main camera) and then stores them.
Reimplemented in PlatformerPro.CameraTransitionPoint.
bool PlatformerPro.CameraZone.IsInZone | ( | Transform | t | ) |
Returns true if transform is in zone.
true
if this instance is in zone the specified t; otherwise, false
.t | Transform. |
|
virtual |
Gets the maximum bounds.
|
virtual |
Gets the minimum bounds.
float PlatformerPro.CameraZone.cameraZOffset |
The cameras Z offset from this zones transform.
|
static |
Static list of all camera zones.
float PlatformerPro.CameraZone.height |
Height of the zone in world units.
|
protected |
|
protected |
|
protected |
Color PlatformerPro.CameraZone.outlineColor = new Color(0,0,1,0.25f) |
bool PlatformerPro.CameraZone.updateDynamically |
float PlatformerPro.CameraZone.width |
Width of the zone in world units.
Color PlatformerPro.CameraZone.zoneColor = new Color(0,0,1,0.05f) |
|
get |
Gets the actual zone that the camera should be in. Could be different to this for example in the case of a Transition Point.
The actual zone.
|
get |
Gets the position the camera should transition to.
|
getprotected set |
Track if the zone is smaller than camera viewport. If it is we wont snap to bounds.