Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
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 { OverTime , Instant , ShakerEvent , ToDestination }
 the possible modes for this feedback More...

Public Attributes

Light BoundLight
 the light to affect when playing the feedback
List< Light > ExtraLights
 a list of optional extra lights to also affect when playing the feedback
Modes Mode = Modes.OverTime
 whether the feedback should affect the light instantly or over a period of time
float Duration = 0.2f
 how long the light should change over time
bool StartsOff = true
 whether or not that light should be turned off on start
bool DisableOnStop = false
 if this is true, the light will be disabled when this feedbacks is stopped
bool RelativeValues = true
 whether or not the values should be relative or not
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake
bool OnlyBroadcastInRange = false
 whether or not to broadcast a range to only affect certain shakers
float EventRange = 100f
 the range of the event, in units
Transform EventOriginTransform
 the transform to use to broadcast the event as origin point
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
bool ModifyColor = true
 whether or not to modify the color of the light
Gradient ColorOverTime
 the colors to apply to the light over time
Color InstantColor = Color.red
 the color to move to in instant mode
Color ToDestinationColor = Color.red
 the color to move to in destination mode
bool ModifyIntensity = true
 whether or not to modify the intensity of the light
AnimationCurve IntensityCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the curve to tween the intensity on
float RemapIntensityZero = 0f
 the value to remap the intensity curve's 0 to
float RemapIntensityOne = 1f
 the value to remap the intensity curve's 1 to
float InstantIntensity = 1f
 the value to move the intensity to in instant mode
float ToDestinationIntensity = 1f
 the value to move the intensity to in ToDestination mode
bool ModifyRange = true
 whether or not to modify the range of the light
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
float RemapRangeZero = 0f
 the value to remap the range curve's 0 to
float RemapRangeOne = 10f
 the value to remap the range curve's 0 to
float InstantRange = 10f
 the value to move the intensity to in instant mode
float ToDestinationRange = 10f
 the value to move the intensity to in ToDestination mode
bool ModifyShadowStrength = true
 whether or not to modify the shadow strength of the light
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
float RemapShadowStrengthZero = 0f
 the value to remap the shadow strength's curve's 0 to
float RemapShadowStrengthOne = 1f
 the value to remap the shadow strength's curve's 1 to
float InstantShadowStrength = 1f
 the value to move the shadow strength to in instant mode
float ToDestinationShadowStrength = 1f
 the value to move the shadow strength to in ToDestination mode

Static Public Attributes

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

Protected Member Functions

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

Protected Attributes

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

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback
override bool HasChannel [get]
override bool HasRandomness [get]
override bool HasAutomatedTargetAcquisition [get]

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 )
protected

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

Parameters
position
feedbacksIntensity

◆ 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

◆ ExtraLights

List<Light> MoreMountains.Feedbacks.MMF_Light.ExtraLights

a list of optional extra lights to also affect when playing the feedback

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Light.FeedbackTypeAuthorized = true
static

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

◆ 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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_Light.HasAutomatedTargetAcquisition
get

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_Light.HasChannel
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_Light.HasRandomness
get

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/feel/Assets/Feel/MMFeedbacks/MMFeedbacks/Feedbacks/MMF_Light.cs