This class will allow you to trigger zooms on your cinemachine camera by sending MMCameraZoomEvents from any other class.
More...
|
| virtual float | GetTime () |
| virtual float | GetDeltaTime () |
| virtual void | Zoom (MMCameraZoomModes mode, float newFieldOfView, float transitionDuration, float duration, bool useUnscaledTime, bool relative=false, MMTweenType tweenType=null) |
| | A method that triggers the zoom, ideally only to be called via an event, but public for convenience.
|
| virtual void | OnCameraZoomEvent (MMCameraZoomModes mode, float newFieldOfView, float transitionDuration, float duration, MMChannelData channelData, bool useUnscaledTime, bool stop=false, bool relative=false, bool restore=false, MMTweenType tweenType=null) |
| | When we get an MMCameraZoomEvent we call our zoom method.
|
|
| MMChannelModes | ChannelMode = MMChannelModes.Int |
| int | Channel = 0 |
| | the channel to listen to - has to match the one on the feedback
|
| MMChannel | MMChannelDefinition = null |
| bool | Interruptable = false |
| | if this is true, triggering a new zoom event will interrupt any transition that may be in progress
|
| MMTweenType | ZoomTween = new MMTweenType( new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(1f, 1f))) |
| | the animation curve to apply to the zoom transition
|
| MMCameraZoomModes | TestMode |
| | the mode to apply the zoom in when using the test button in the inspector
|
| float | TestFieldOfView = 30f |
| | the target field of view to apply the zoom in when using the test button in the inspector
|
| float | TestTransitionDuration = 0.1f |
| | the transition duration to apply the zoom in when using the test button in the inspector
|
| float | TestDuration = 0.05f |
| | the duration to apply the zoom in when using the test button in the inspector
|
| bool | TestZoomButton |
| | an inspector button to test the zoom in play mode
|
|
| virtual void | Awake () |
| | On Awake we grab our CM camera.
|
| virtual void | Update () |
| | On Update if we're zooming we modify our field of view accordingly.
|
| virtual void | TestZoom () |
| | The method used by the test button to trigger a test zoom.
|
| virtual void | OnDestroy () |
| | Stops listening for MMCameraZoomEvents.
|
This class will allow you to trigger zooms on your cinemachine camera by sending MMCameraZoomEvents from any other class.
◆ Awake()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.Awake |
( |
| ) |
|
|
protectedvirtual |
On Awake we grab our CM camera.
◆ GetDeltaTime()
| virtual float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.GetDeltaTime |
( |
| ) |
|
|
virtual |
◆ GetTime()
| virtual float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.GetTime |
( |
| ) |
|
|
virtual |
◆ OnCameraZoomEvent()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.OnCameraZoomEvent |
( |
MMCameraZoomModes | mode, |
|
|
float | newFieldOfView, |
|
|
float | transitionDuration, |
|
|
float | duration, |
|
|
MMChannelData | channelData, |
|
|
bool | useUnscaledTime, |
|
|
bool | stop = false, |
|
|
bool | relative = false, |
|
|
bool | restore = false, |
|
|
MMTweenType | tweenType = null ) |
|
virtual |
◆ OnDestroy()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.OnDestroy |
( |
| ) |
|
|
protectedvirtual |
Stops listening for MMCameraZoomEvents.
◆ TestZoom()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TestZoom |
( |
| ) |
|
|
protectedvirtual |
The method used by the test button to trigger a test zoom.
◆ Update()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.Update |
( |
| ) |
|
|
protectedvirtual |
On Update if we're zooming we modify our field of view accordingly.
◆ Zoom()
| virtual void MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.Zoom |
( |
MMCameraZoomModes | mode, |
|
|
float | newFieldOfView, |
|
|
float | transitionDuration, |
|
|
float | duration, |
|
|
bool | useUnscaledTime, |
|
|
bool | relative = false, |
|
|
MMTweenType | tweenType = null ) |
|
virtual |
A method that triggers the zoom, ideally only to be called via an event, but public for convenience.
- Parameters
-
| mode | |
| newFieldOfView | |
| transitionDuration | |
| duration | |
◆ _destinationReached
| bool MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._destinationReached = false |
|
protected |
◆ _direction
| int MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._direction = 1 |
|
protected |
◆ _duration
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._duration |
|
protected |
◆ _elapsedTime
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._elapsedTime = 0f |
|
protected |
◆ _initialFieldOfView
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._initialFieldOfView |
|
protected |
◆ _mode
◆ _reachedDestinationTimestamp
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._reachedDestinationTimestamp |
|
protected |
◆ _startFieldOfView
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._startFieldOfView |
|
protected |
◆ _targetFieldOfView
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._targetFieldOfView |
|
protected |
◆ _transitionDuration
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._transitionDuration |
|
protected |
◆ _zoomStartedAt
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom._zoomStartedAt = 0f |
|
protected |
◆ Channel
| int MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.Channel = 0 |
the channel to listen to - has to match the one on the feedback
◆ ChannelMode
| MMChannelModes MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.ChannelMode = MMChannelModes.Int |
whether to listen on a channel defined by an int or by a MMChannel scriptable object. Ints are simple to setup but can get messy and make it harder to remember what int corresponds to what. MMChannel scriptable objects require you to create them in advance, but come with a readable name and are more scalable
◆ Interruptable
| bool MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.Interruptable = false |
if this is true, triggering a new zoom event will interrupt any transition that may be in progress
◆ MMChannelDefinition
| MMChannel MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.MMChannelDefinition = null |
the MMChannel definition asset to use to listen for events. The feedbacks targeting this shaker will have to reference that same MMChannel definition to receive events - to create a MMChannel, right click anywhere in your project (usually in a Data folder) and go MoreMountains > MMChannel, then name it with some unique name
◆ TestDuration
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TestDuration = 0.05f |
the duration to apply the zoom in when using the test button in the inspector
◆ TestFieldOfView
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TestFieldOfView = 30f |
the target field of view to apply the zoom in when using the test button in the inspector
◆ TestMode
the mode to apply the zoom in when using the test button in the inspector
◆ TestTransitionDuration
| float MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TestTransitionDuration = 0.1f |
the transition duration to apply the zoom in when using the test button in the inspector
◆ TestZoomButton
| bool MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TestZoomButton |
an inspector button to test the zoom in play mode
◆ ZoomTween
| MMTweenType MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.ZoomTween = new MMTweenType( new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(1f, 1f))) |
the animation curve to apply to the zoom transition
◆ TimescaleMode
| virtual TimescaleModes MoreMountains.FeedbacksForThirdParty.MMCinemachineZoom.TimescaleMode |
|
getset |
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/Cinemachine/Shakers/MMCinemachineZoom.cs