Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.FeedbacksForThirdParty.MMCameraZoom Class Reference

This class will allow you to trigger zooms on your camera by sending MMCameraZoomEvents from any other class More...

Inheritance diagram for MoreMountains.FeedbacksForThirdParty.MMCameraZoom:

Public Member Functions

virtual float GetTime ()
 
virtual float GetDeltaTime ()
 
virtual void Zoom (MMCameraZoomModes mode, float newFieldOfView, float transitionDuration, float duration, bool useUnscaledTime, bool relative=false)
 A method that triggers the zoom, ideally only to be called via an event, but public for convenience More...
 
virtual void OnCameraZoomEvent (MMCameraZoomModes mode, float newFieldOfView, float transitionDuration, float duration, int channel, bool useUnscaledTime, bool stop=false, bool relative=false)
 When we get an MMCameraZoomEvent we call our zoom method More...
 

Public Attributes

int Channel = 0
 
AnimationCurve ZoomCurve = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(1f, 1f))
 the animation curve to apply to the zoom transition More...
 
MMCameraZoomModes TestMode
 the mode to apply the zoom in when using the test button in the inspector More...
 
float TestFieldOfView = 30f
 the target field of view to apply the zoom in when using the test button in the inspector More...
 
float TestTransitionDuration = 0.1f
 the transition duration to apply the zoom in when using the test button in the inspector More...
 
float TestDuration = 0.05f
 the duration to apply the zoom in when using the test button in the inspector More...
 
bool TestZoomButton
 an inspector button to test the zoom in play mode More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we grab our virtual camera More...
 
virtual void Update ()
 On Update if we're zooming we modify our field of view accordingly More...
 
virtual void TestZoom ()
 The method used by the test button to trigger a test zoom More...
 
virtual void OnEnable ()
 Starts listening for MMCameraZoomEvents More...
 
virtual void OnDisable ()
 Stops listening for MMCameraZoomEvents More...
 

Protected Attributes

Camera _camera
 
float _initialFieldOfView
 
MMCameraZoomModes _mode
 
bool _zooming = false
 
float _startFieldOfView
 
float _transitionDuration
 
float _duration
 
float _targetFieldOfView
 
float _delta = 0f
 
int _direction = 1
 
float _reachedDestinationTimestamp
 
bool _destinationReached = false
 

Properties

TimescaleModes TimescaleMode [getset]
 

Detailed Description

This class will allow you to trigger zooms on your camera by sending MMCameraZoomEvents from any other class

Member Function Documentation

◆ Awake()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.Awake ( )
protectedvirtual

On Awake we grab our virtual camera

◆ GetDeltaTime()

virtual float MoreMountains.FeedbacksForThirdParty.MMCameraZoom.GetDeltaTime ( )
virtual

◆ GetTime()

virtual float MoreMountains.FeedbacksForThirdParty.MMCameraZoom.GetTime ( )
virtual

◆ OnCameraZoomEvent()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.OnCameraZoomEvent ( MMCameraZoomModes  mode,
float  newFieldOfView,
float  transitionDuration,
float  duration,
int  channel,
bool  useUnscaledTime,
bool  stop = false,
bool  relative = false 
)
virtual

When we get an MMCameraZoomEvent we call our zoom method

Parameters
zoomEvent

◆ OnDisable()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.OnDisable ( )
protectedvirtual

Stops listening for MMCameraZoomEvents

◆ OnEnable()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.OnEnable ( )
protectedvirtual

Starts listening for MMCameraZoomEvents

◆ TestZoom()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestZoom ( )
protectedvirtual

The method used by the test button to trigger a test zoom

◆ Update()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.Update ( )
protectedvirtual

On Update if we're zooming we modify our field of view accordingly

◆ Zoom()

virtual void MoreMountains.FeedbacksForThirdParty.MMCameraZoom.Zoom ( MMCameraZoomModes  mode,
float  newFieldOfView,
float  transitionDuration,
float  duration,
bool  useUnscaledTime,
bool  relative = false 
)
virtual

A method that triggers the zoom, ideally only to be called via an event, but public for convenience

Parameters
mode
newFieldOfView
transitionDuration
duration

Member Data Documentation

◆ _camera

Camera MoreMountains.FeedbacksForThirdParty.MMCameraZoom._camera
protected

◆ _delta

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._delta = 0f
protected

◆ _destinationReached

bool MoreMountains.FeedbacksForThirdParty.MMCameraZoom._destinationReached = false
protected

◆ _direction

int MoreMountains.FeedbacksForThirdParty.MMCameraZoom._direction = 1
protected

◆ _duration

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._duration
protected

◆ _initialFieldOfView

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._initialFieldOfView
protected

◆ _mode

MMCameraZoomModes MoreMountains.FeedbacksForThirdParty.MMCameraZoom._mode
protected

◆ _reachedDestinationTimestamp

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._reachedDestinationTimestamp
protected

◆ _startFieldOfView

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._startFieldOfView
protected

◆ _targetFieldOfView

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._targetFieldOfView
protected

◆ _transitionDuration

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom._transitionDuration
protected

◆ _zooming

bool MoreMountains.FeedbacksForThirdParty.MMCameraZoom._zooming = false
protected

◆ Channel

int MoreMountains.FeedbacksForThirdParty.MMCameraZoom.Channel = 0

◆ TestDuration

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestDuration = 0.05f

the duration to apply the zoom in when using the test button in the inspector

◆ TestFieldOfView

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestFieldOfView = 30f

the target field of view to apply the zoom in when using the test button in the inspector

◆ TestMode

MMCameraZoomModes MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestMode

the mode to apply the zoom in when using the test button in the inspector

◆ TestTransitionDuration

float MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestTransitionDuration = 0.1f

the transition duration to apply the zoom in when using the test button in the inspector

◆ TestZoomButton

bool MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TestZoomButton

an inspector button to test the zoom in play mode

◆ ZoomCurve

AnimationCurve MoreMountains.FeedbacksForThirdParty.MMCameraZoom.ZoomCurve = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(1f, 1f))

the animation curve to apply to the zoom transition

Property Documentation

◆ TimescaleMode

TimescaleModes MoreMountains.FeedbacksForThirdParty.MMCameraZoom.TimescaleMode
getset

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