Feel  5.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMPostProcessingMovingFilter Class Reference

More...

Inheritance diagram for MoreMountains.Tools.MMPostProcessingMovingFilter:

Public Types

enum  TimeScales { TimeScales.Unscaled, TimeScales.Scaled }
 

Public Member Functions

virtual void RestoreInitialPosition ()
 
virtual void OnMMPostProcessingMovingFilterEvent (MMTweenType curve, bool active, bool toggle, float duration, int channel=0, bool stop=false, bool restore=false)
 if we get a PostProcessingTriggerEvent More...
 

Public Attributes

int Channel = 0
 the channel ID for this filter. Any event with a different channel ID will be ignored More...
 
TimeScales TimeScale = TimeScales.Unscaled
 whether this should use scaled or unscaled time More...
 
MMTweenType Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)
 the curve to use for this movement More...
 
bool Active = false
 whether the filter is active at start or not More...
 
Vector2 FilterOffset = new Vector2(0f, 5f)
 the vertical offsets to apply when the filter is on or off More...
 
bool AddToInitialPosition = true
 whether or not to add the initial position More...
 
float TestDuration = 0.5f
 the duration to apply to the test methods More...
 
bool PostProcessingToggleButton
 a test button to toggle the filter on or off More...
 
bool PostProcessingTriggerOffButton
 a test button to turn the filter off More...
 
bool PostProcessingTriggerOnButton
 a test button to turn the filter on More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our filter More...
 
virtual void Initialization ()
 Sets the filter at the right initial position More...
 
virtual void Update ()
 On update we move if needed More...
 
virtual void MoveTowardsCurrentTarget ()
 Moves the filter towards its current target position More...
 
virtual void OnEnable ()
 On enable, we start listening to MMPostProcessingTriggerEvents More...
 
virtual void OnDisable ()
 On disable, we stop listening to MMPostProcessingTriggerEvents More...
 
virtual void PostProcessingToggle ()
 Toggles the post processing effect on or off More...
 
virtual void PostProcessingTriggerOff ()
 Turns the post processing effect off More...
 
virtual void PostProcessingTriggerOn ()
 Turns the post processing effect on More...
 

Protected Attributes

bool _lastReachedState = false
 
float _duration = 2f
 
float _lastMovementStartedAt = 0f
 
Vector3 _initialPosition
 
Vector3 _positionToRestore
 
Vector3 _newPosition
 

Detailed Description

This class lets you create moving filters, very much like the old gelatin camera filters, that will move to connect to your camera Typically a moving filter should be made of a MMPostProcessingMovingFilter component, a PostProcessing volume, and a BoxCollider (recommended size is 1,1,1 if you want to use the default offset) The filter will move on the y axis.

Use : MMPostProcessingMovingFilterEvent.Trigger(MMTween.MMTweenCurve.EaseInOutCubic, TrueOrFalse, Duration, ChannelID);

Member Enumeration Documentation

◆ TimeScales

Enumerator
Unscaled 
Scaled 

Member Function Documentation

◆ Initialization()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.Initialization ( )
protectedvirtual

Sets the filter at the right initial position

◆ MoveTowardsCurrentTarget()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.MoveTowardsCurrentTarget ( )
protectedvirtual

Moves the filter towards its current target position

◆ OnDisable()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.OnDisable ( )
protectedvirtual

On disable, we stop listening to MMPostProcessingTriggerEvents

◆ OnEnable()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.OnEnable ( )
protectedvirtual

On enable, we start listening to MMPostProcessingTriggerEvents

◆ OnMMPostProcessingMovingFilterEvent()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.OnMMPostProcessingMovingFilterEvent ( MMTweenType  curve,
bool  active,
bool  toggle,
float  duration,
int  channel = 0,
bool  stop = false,
bool  restore = false 
)
virtual

if we get a PostProcessingTriggerEvent

Parameters
curve
active
duration
channel

◆ PostProcessingToggle()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingToggle ( )
protectedvirtual

Toggles the post processing effect on or off

◆ PostProcessingTriggerOff()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingTriggerOff ( )
protectedvirtual

Turns the post processing effect off

◆ PostProcessingTriggerOn()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingTriggerOn ( )
protectedvirtual

Turns the post processing effect on

◆ RestoreInitialPosition()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.RestoreInitialPosition ( )
virtual

◆ Start()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.Start ( )
protectedvirtual

On Start we initialize our filter

◆ Update()

virtual void MoreMountains.Tools.MMPostProcessingMovingFilter.Update ( )
protectedvirtual

On update we move if needed

Member Data Documentation

◆ _duration

float MoreMountains.Tools.MMPostProcessingMovingFilter._duration = 2f
protected

◆ _initialPosition

Vector3 MoreMountains.Tools.MMPostProcessingMovingFilter._initialPosition
protected

◆ _lastMovementStartedAt

float MoreMountains.Tools.MMPostProcessingMovingFilter._lastMovementStartedAt = 0f
protected

◆ _lastReachedState

bool MoreMountains.Tools.MMPostProcessingMovingFilter._lastReachedState = false
protected

◆ _newPosition

Vector3 MoreMountains.Tools.MMPostProcessingMovingFilter._newPosition
protected

◆ _positionToRestore

Vector3 MoreMountains.Tools.MMPostProcessingMovingFilter._positionToRestore
protected

◆ Active

bool MoreMountains.Tools.MMPostProcessingMovingFilter.Active = false

whether the filter is active at start or not

◆ AddToInitialPosition

bool MoreMountains.Tools.MMPostProcessingMovingFilter.AddToInitialPosition = true

whether or not to add the initial position

◆ Channel

int MoreMountains.Tools.MMPostProcessingMovingFilter.Channel = 0

the channel ID for this filter. Any event with a different channel ID will be ignored

◆ Curve

MMTweenType MoreMountains.Tools.MMPostProcessingMovingFilter.Curve = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)

the curve to use for this movement

◆ FilterOffset

Vector2 MoreMountains.Tools.MMPostProcessingMovingFilter.FilterOffset = new Vector2(0f, 5f)

the vertical offsets to apply when the filter is on or off

◆ PostProcessingToggleButton

bool MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingToggleButton

a test button to toggle the filter on or off

◆ PostProcessingTriggerOffButton

bool MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingTriggerOffButton

a test button to turn the filter off

◆ PostProcessingTriggerOnButton

bool MoreMountains.Tools.MMPostProcessingMovingFilter.PostProcessingTriggerOnButton

a test button to turn the filter on

◆ TestDuration

float MoreMountains.Tools.MMPostProcessingMovingFilter.TestDuration = 0.5f

the duration to apply to the test methods

◆ TimeScale

TimeScales MoreMountains.Tools.MMPostProcessingMovingFilter.TimeScale = TimeScales.Unscaled

whether this should use scaled or unscaled time


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