TopDown Engine  v4.1
MoreMountains.Feedbacks.MMF_Light Class Reference

This feedback will let you control the color and intensity of a Light when played More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_Light:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  Modes { Modes.OverTime, Modes.Instant, Modes.ShakerEvent, Modes.ToDestination }
 the possible modes for this feedback More...
 

Public Attributes

override bool HasChannel => true
 
override bool HasRandomness => true
 
override bool HasAutomatedTargetAcquisition => true
 
Light BoundLight
 the light to affect when playing the feedback More...
 
Modes Mode = Modes.OverTime
 whether the feedback should affect the light instantly or over a period of time More...
 
float Duration = 0.2f
 how long the light should change over time More...
 
bool StartsOff = true
 whether or not that light should be turned off on start More...
 
bool DisableOnStop = false
 if this is true, the light will be disabled when this feedbacks is stopped More...
 
bool RelativeValues = true
 whether or not the values should be relative or not More...
 
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake More...
 
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake More...
 
bool OnlyBroadcastInRange = false
 whether or not to broadcast a range to only affect certain shakers More...
 
float EventRange = 100f
 the range of the event, in units More...
 
Transform EventOriginTransform
 the transform to use to broadcast the event as origin point More...
 
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over More...
 
bool ModifyColor = true
 whether or not to modify the color of the light More...
 
Gradient ColorOverTime
 the colors to apply to the light over time More...
 
Color InstantColor = Color.red
 the color to move to in instant mode More...
 
Color ToDestinationColor = Color.red
 the color to move to in destination mode More...
 
bool ModifyIntensity = true
 whether or not to modify the intensity of the light More...
 
AnimationCurve IntensityCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the curve to tween the intensity on More...
 
float RemapIntensityZero = 0f
 the value to remap the intensity curve's 0 to More...
 
float RemapIntensityOne = 1f
 the value to remap the intensity curve's 1 to More...
 
float InstantIntensity = 1f
 the value to move the intensity to in instant mode More...
 
float ToDestinationIntensity = 1f
 the value to move the intensity to in ToDestination mode More...
 
bool ModifyRange = true
 whether or not to modify the range of the light More...
 
AnimationCurve RangeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the range to apply to the light over time More...
 
float RemapRangeZero = 0f
 the value to remap the range curve's 0 to More...
 
float RemapRangeOne = 10f
 the value to remap the range curve's 0 to More...
 
float InstantRange = 10f
 the value to move the intensity to in instant mode More...
 
float ToDestinationRange = 10f
 the value to move the intensity to in ToDestination mode More...
 
bool ModifyShadowStrength = true
 whether or not to modify the shadow strength of the light More...
 
AnimationCurve ShadowStrengthCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the range to apply to the light over time More...
 
float RemapShadowStrengthZero = 0f
 the value to remap the shadow strength's curve's 0 to More...
 
float RemapShadowStrengthOne = 1f
 the value to remap the shadow strength's curve's 1 to More...
 
float InstantShadowStrength = 1f
 the value to move the shadow strength to in instant mode More...
 
float ToDestinationShadowStrength = 1f
 the value to move the shadow strength to in ToDestination mode More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomInitialization (MMF_Player owner)
 On init we turn the light off if needed More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we turn our light on and start an over time coroutine if needed More...
 
virtual IEnumerator LightSequence (float intensityMultiplier)
 This coroutine will modify the intensity and color of the light over time More...
 
virtual void SetLightValues (float time, float intensityMultiplier)
 Sets the various values on the light on a specified time (between 0 and 1) More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Turns the light off on stop More...
 
virtual void Turn (bool status)
 Turns the light on or off More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

float _initialRange
 
float _initialShadowStrength
 
float _initialIntensity
 
Coroutine _coroutine
 
Color _initialColor
 
Color _targetColor
 

Properties

override float? FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

Additional Inherited Members

Detailed Description

This feedback will let you control the color and intensity of a Light when played

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 
ShakerEvent 
ToDestination 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_Light.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_Light.CustomInitialization ( MMF_Player  owner)
protectedvirtual

On init we turn the light off if needed

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_Light.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play we turn our light on and start an over time coroutine if needed

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_Light.CustomRestoreInitialValues ( )
protectedvirtual

On restore, we put our object back at its initial position

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_Light.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

Turns the light off on stop

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ LightSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Light.LightSequence ( float  intensityMultiplier)
protectedvirtual

This coroutine will modify the intensity and color of the light over time

Returns

◆ SetLightValues()

virtual void MoreMountains.Feedbacks.MMF_Light.SetLightValues ( float  time,
float  intensityMultiplier 
)
protectedvirtual

Sets the various values on the light on a specified time (between 0 and 1)

Parameters
time

◆ Turn()

virtual void MoreMountains.Feedbacks.MMF_Light.Turn ( bool  status)
protectedvirtual

Turns the light on or off

Parameters
status

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Light._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_Light._initialColor
protected

◆ _initialIntensity

float MoreMountains.Feedbacks.MMF_Light._initialIntensity
protected

◆ _initialRange

float MoreMountains.Feedbacks.MMF_Light._initialRange
protected

◆ _initialShadowStrength

float MoreMountains.Feedbacks.MMF_Light._initialShadowStrength
protected

◆ _targetColor

Color MoreMountains.Feedbacks.MMF_Light._targetColor
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_Light.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ BoundLight

Light MoreMountains.Feedbacks.MMF_Light.BoundLight

the light to affect when playing the feedback

◆ ColorOverTime

Gradient MoreMountains.Feedbacks.MMF_Light.ColorOverTime

the colors to apply to the light over time

◆ DisableOnStop

bool MoreMountains.Feedbacks.MMF_Light.DisableOnStop = false

if this is true, the light will be disabled when this feedbacks is stopped

◆ Duration

float MoreMountains.Feedbacks.MMF_Light.Duration = 0.2f

how long the light should change over time

◆ EventOriginTransform

Transform MoreMountains.Feedbacks.MMF_Light.EventOriginTransform

the transform to use to broadcast the event as origin point

◆ EventRange

float MoreMountains.Feedbacks.MMF_Light.EventRange = 100f

the range of the event, in units

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Light.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_Light.HasAutomatedTargetAcquisition => true

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_Light.HasChannel => true

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_Light.HasRandomness => true

◆ InstantColor

Color MoreMountains.Feedbacks.MMF_Light.InstantColor = Color.red

the color to move to in instant mode

◆ InstantIntensity

float MoreMountains.Feedbacks.MMF_Light.InstantIntensity = 1f

the value to move the intensity to in instant mode

◆ InstantRange

float MoreMountains.Feedbacks.MMF_Light.InstantRange = 10f

the value to move the intensity to in instant mode

◆ InstantShadowStrength

float MoreMountains.Feedbacks.MMF_Light.InstantShadowStrength = 1f

the value to move the shadow strength to in instant mode

◆ IntensityCurve

AnimationCurve MoreMountains.Feedbacks.MMF_Light.IntensityCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

the curve to tween the intensity on

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Light.Mode = Modes.OverTime

whether the feedback should affect the light instantly or over a period of time

◆ ModifyColor

bool MoreMountains.Feedbacks.MMF_Light.ModifyColor = true

whether or not to modify the color of the light

◆ ModifyIntensity

bool MoreMountains.Feedbacks.MMF_Light.ModifyIntensity = true

whether or not to modify the intensity of the light

◆ ModifyRange

bool MoreMountains.Feedbacks.MMF_Light.ModifyRange = true

whether or not to modify the range of the light

◆ ModifyShadowStrength

bool MoreMountains.Feedbacks.MMF_Light.ModifyShadowStrength = true

whether or not to modify the shadow strength of the light

◆ OnlyBroadcastInRange

bool MoreMountains.Feedbacks.MMF_Light.OnlyBroadcastInRange = false

whether or not to broadcast a range to only affect certain shakers

◆ RangeCurve

AnimationCurve MoreMountains.Feedbacks.MMF_Light.RangeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

the range to apply to the light over time

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_Light.RelativeValues = true

whether or not the values should be relative or not

◆ RemapIntensityOne

float MoreMountains.Feedbacks.MMF_Light.RemapIntensityOne = 1f

the value to remap the intensity curve's 1 to

◆ RemapIntensityZero

float MoreMountains.Feedbacks.MMF_Light.RemapIntensityZero = 0f

the value to remap the intensity curve's 0 to

◆ RemapRangeOne

float MoreMountains.Feedbacks.MMF_Light.RemapRangeOne = 10f

the value to remap the range curve's 0 to

◆ RemapRangeZero

float MoreMountains.Feedbacks.MMF_Light.RemapRangeZero = 0f

the value to remap the range curve's 0 to

◆ RemapShadowStrengthOne

float MoreMountains.Feedbacks.MMF_Light.RemapShadowStrengthOne = 1f

the value to remap the shadow strength's curve's 1 to

◆ RemapShadowStrengthZero

float MoreMountains.Feedbacks.MMF_Light.RemapShadowStrengthZero = 0f

the value to remap the shadow strength's curve's 0 to

◆ ResetShakerValuesAfterShake

bool MoreMountains.Feedbacks.MMF_Light.ResetShakerValuesAfterShake = true

whether or not to reset shaker values after shake

◆ ResetTargetValuesAfterShake

bool MoreMountains.Feedbacks.MMF_Light.ResetTargetValuesAfterShake = true

whether or not to reset the target's values after shake

◆ ShadowStrengthCurve

AnimationCurve MoreMountains.Feedbacks.MMF_Light.ShadowStrengthCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

the range to apply to the light over time

◆ StartsOff

bool MoreMountains.Feedbacks.MMF_Light.StartsOff = true

whether or not that light should be turned off on start

◆ ToDestinationColor

Color MoreMountains.Feedbacks.MMF_Light.ToDestinationColor = Color.red

the color to move to in destination mode

◆ ToDestinationIntensity

float MoreMountains.Feedbacks.MMF_Light.ToDestinationIntensity = 1f

the value to move the intensity to in ToDestination mode

◆ ToDestinationRange

float MoreMountains.Feedbacks.MMF_Light.ToDestinationRange = 10f

the value to move the intensity to in ToDestination mode

◆ ToDestinationShadowStrength

float MoreMountains.Feedbacks.MMF_Light.ToDestinationShadowStrength = 1f

the value to move the shadow strength to in ToDestination mode

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_Light.FeedbackDuration
getset

sets the inspector color for this feedback

the duration of this feedback is the duration of the light, or 0 if instant


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