TopDown Engine v4.3
MoreMountains.Feedbacks.MMSpringVector4< T > Class Template Reference

A spring component used to pilot Vector4 values on a target More...

Inheritance diagram for MoreMountains.Feedbacks.MMSpringVector4< T >:
MoreMountains.Feedbacks.MMSpringDefinition< Vector4 > MoreMountains.Feedbacks.MMSpringComponentBase MoreMountains.Tools.MMEventListener< MMSpringVector4Event > MoreMountains.Tools.MMMonoBehaviour

Public Member Functions

virtual void MoveTo (Vector4 newValue)
 
virtual void MoveToAdditive (Vector4 newValue)
 
virtual void MoveToSubtractive (Vector4 newValue)
 
virtual void MoveToRandom ()
 
virtual void MoveToInstant (Vector4 newValue)
 
virtual void MoveToRandom (Vector4 min, Vector4 max)
 
virtual void Bump (Vector4 bumpAmount)
 
virtual void BumpRandom ()
 
virtual void BumpRandom (Vector4 min, Vector4 max)
 
override void Stop ()
 Stops all value movement on this spring More...
 
override void RestoreInitialValue ()
 Restores this spring's initial value More...
 
override void ResetInitialValue ()
 Sets the current value of this spring as its new initial value, overriding the previous one More...
 
override void Finish ()
 Moves this spring to its destination and disables it More...
 
void OnMMEvent (MMSpringVector4Event springEvent)
 
 MMSpringVector4 ()
 
virtual void SetDamping (Vector4 newDamping)
 
virtual void SetFrequency (Vector4 newFrequency)
 
override void UpdateSpringValue (float deltaTime)
 
override void MoveToInstant (Vector4 newValue)
 
override void Stop ()
 Stops all value movement on this spring More...
 
override void SetInitialValue (Vector4 newInitialValue)
 
override void RestoreInitialValue ()
 Restores this spring's initial value More...
 
override void SetCurrentValueAsInitialValue ()
 
override void MoveTo (Vector4 newValue)
 
override void MoveToAdditive (Vector4 newValue)
 
override void MoveToSubtractive (Vector4 newValue)
 
override void MoveToRandom (Vector4 min, Vector4 max)
 
override void Bump (Vector4 bumpAmount)
 
override void BumpRandom (Vector4 min, Vector4 max)
 
override void Finish ()
 Moves this spring to its destination and disables it More...
 
- Public Member Functions inherited from MoreMountains.Feedbacks.MMSpringDefinition< Vector4 >
abstract void MoveToInstant (T newValue)
 
abstract void SetInitialValue (T newInitialValue)
 
abstract void MoveTo (T newValue)
 
abstract void MoveToAdditive (T newValue)
 
abstract void MoveToSubtractive (T newValue)
 
abstract void MoveToRandom (T min, T max)
 
abstract void Bump (T bumpAmount)
 
abstract void BumpRandom (T min, T max)
 
- Public Member Functions inherited from MoreMountains.Feedbacks.MMSpringComponentBase
virtual void SetVelocityLowThreshold (float threshold)
 Sets the threshold under which the spring will consider its velocity as too low and will self disable More...
 
- Public Member Functions inherited from MoreMountains.Tools.MMEventListener< MMSpringVector4Event >
void OnMMEvent (T eventType)
 

Public Attributes

Target
 
TimeScaleModes TimeScaleMode = TimeScaleModes.Scaled
 whether this spring should run on scaled time (and be impacted by time scale changes) or unscaled time (and not be impacted by time scale changes) More...
 
MMChannelModes ChannelMode = MMChannelModes.Int
 
int Channel = 0
 the channel to listen to - has to match the one on the feedback More...
 
MMChannel MMChannelDefinition = null
 
MMSpringVector4 SpringVector4 = new MMSpringVector4()
 
Vector4 MoveToRandomValueMin = new Vector4(-2f, -2f, -2f, -2f)
 the minimum vector from which to pick a random value when calling MoveToRandom() More...
 
Vector4 MoveToRandomValueMax = new Vector4(2f, 2f, 2f, 2f)
 the maximum vector from which to pick a random value when calling MoveToRandom() More...
 
Vector2 BumpAmountRandomValueMin = new Vector4(-20f, -20f, -20f, -20f)
 the minimum vector from which to pick a random value when calling BumpRandom() More...
 
Vector2 BumpAmountRandomValueMax = new Vector4(20f, 20f, 20f, 20f)
 the maximum vector from which to pick a random value when calling BumpRandom() More...
 
Vector4 TestMoveToValue = new Vector4(2f, 2f, 2f, 2f)
 the value to move this spring to when interacting with any of the MoveTo debug buttons in its inspector More...
 
bool MoveToToolbar
 
Vector4 TestBumpAmount = new Vector4(75f, 100f, 50f, 25f)
 the amount by which to bump this spring when interacting with the Bump debug button in its inspector More...
 
bool BumpToToolbar
 
bool OtherControlsToToolbar
 
bool SeparateAxis = false
 
MMSpringFloat UnifiedSpring
 
MMSpringFloat SpringX
 
MMSpringFloat SpringY
 
MMSpringFloat SpringZ
 
MMSpringFloat SpringW
 
- Public Attributes inherited from MoreMountains.Feedbacks.MMSpringComponentBase
UnityEvent OnEquilibriumReached
 

Protected Member Functions

override void UpdateSpringValue ()
 Updates the spring's target value More...
 
override void Initialization ()
 Performs initialization for this spring More...
 
virtual void ApplyValue (Vector4 newValue)
 
override void GrabCurrentValue ()
 Grabs the current value on the spring's target More...
 
override void Awake ()
 On awake we self disable More...
 
void OnDestroy ()
 
override void TestMoveTo ()
 
override void TestMoveToAdditive ()
 
override void TestMoveToSubtractive ()
 
override void TestMoveToRandom ()
 
override void TestMoveToInstant ()
 
override void TestBump ()
 
override void TestBumpRandom ()
 
- Protected Member Functions inherited from MoreMountains.Feedbacks.MMSpringComponentBase
virtual void Update ()
 On update we update our spring value and self disable if needed More...
 
virtual void Activate ()
 Activates this component More...
 
virtual void SelfDisable ()
 Disables this component More...
 

Protected Attributes

Vector4 _returnCurrentValue
 
Vector4 _returnTargetValue
 
Vector4 _returnVelocity
 
- Protected Attributes inherited from MoreMountains.Feedbacks.MMSpringComponentBase
float _velocityLowThreshold = 0.001f
 

Properties

override bool LowVelocity [get]
 
float DeltaTime [get]
 
virtual Vector4 TargetVector4 [getset]
 
override Vector4 CurrentValue [getset]
 
override Vector4 TargetValue [getset]
 
override Vector4 Velocity [getset]
 
- Properties inherited from MoreMountains.Feedbacks.MMSpringDefinition< Vector4 >
abstract T CurrentValue [getset]
 
abstract T TargetValue [getset]
 
abstract T Velocity [getset]
 
- Properties inherited from MoreMountains.Feedbacks.MMSpringComponentBase
virtual bool LowVelocity [get]
 whether or not this spring has reached a low enough velocity to self disable More...
 

Additional Inherited Members

- Public Types inherited from MoreMountains.Feedbacks.MMSpringComponentBase
enum  TimeScaleModes { Unscaled , Scaled }
 the different possible timescale modes for the spring More...
 

Detailed Description

A spring component used to pilot Vector4 values on a target

Type Constraints
T :Component 

Constructor & Destructor Documentation

◆ MMSpringVector4()

Member Function Documentation

◆ ApplyValue()

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.ApplyValue ( Vector4  newValue)
protectedvirtual

◆ Awake()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Awake ( )
protectedvirtual

On awake we self disable

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Bump() [1/2]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.Bump ( Vector4  bumpAmount)
virtual

◆ Bump() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Bump ( Vector4  bumpAmount)

◆ BumpRandom() [1/3]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.BumpRandom ( )
virtual

◆ BumpRandom() [2/3]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.BumpRandom ( Vector4  min,
Vector4  max 
)
virtual

◆ BumpRandom() [3/3]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.BumpRandom ( Vector4  min,
Vector4  max 
)

◆ Finish() [1/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Finish ( )
virtual

Moves this spring to its destination and disables it

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Finish() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Finish ( )
virtual

Moves this spring to its destination and disables it

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ GrabCurrentValue()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.GrabCurrentValue ( )
protectedvirtual

Grabs the current value on the spring's target

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Initialization()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Initialization ( )
protectedvirtual

Performs initialization for this spring

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ MoveTo() [1/2]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveTo ( Vector4  newValue)
virtual

◆ MoveTo() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveTo ( Vector4  newValue)

◆ MoveToAdditive() [1/2]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToAdditive ( Vector4  newValue)
virtual

◆ MoveToAdditive() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToAdditive ( Vector4  newValue)

◆ MoveToInstant() [1/2]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToInstant ( Vector4  newValue)
virtual

◆ MoveToInstant() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToInstant ( Vector4  newValue)

◆ MoveToRandom() [1/3]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToRandom ( )
virtual

◆ MoveToRandom() [2/3]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToRandom ( Vector4  min,
Vector4  max 
)
virtual

◆ MoveToRandom() [3/3]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToRandom ( Vector4  min,
Vector4  max 
)

◆ MoveToSubtractive() [1/2]

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToSubtractive ( Vector4  newValue)
virtual

◆ MoveToSubtractive() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToSubtractive ( Vector4  newValue)

◆ OnDestroy()

void MoreMountains.Feedbacks.MMSpringVector4< T >.OnDestroy ( )
protected

◆ OnMMEvent()

void MoreMountains.Feedbacks.MMSpringVector4< T >.OnMMEvent ( MMSpringVector4Event  springEvent)

◆ ResetInitialValue()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.ResetInitialValue ( )
virtual

Sets the current value of this spring as its new initial value, overriding the previous one

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ RestoreInitialValue() [1/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.RestoreInitialValue ( )
virtual

Restores this spring's initial value

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ RestoreInitialValue() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.RestoreInitialValue ( )
virtual

Restores this spring's initial value

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ SetCurrentValueAsInitialValue()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.SetCurrentValueAsInitialValue ( )
virtual

◆ SetDamping()

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.SetDamping ( Vector4  newDamping)
virtual

◆ SetFrequency()

virtual void MoreMountains.Feedbacks.MMSpringVector4< T >.SetFrequency ( Vector4  newFrequency)
virtual

◆ SetInitialValue()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.SetInitialValue ( Vector4  newInitialValue)

◆ Stop() [1/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Stop ( )
virtual

Stops all value movement on this spring

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Stop() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.Stop ( )
virtual

Stops all value movement on this spring

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ TestBump()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestBump ( )
protectedvirtual

◆ TestBumpRandom()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestBumpRandom ( )
protectedvirtual

◆ TestMoveTo()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveTo ( )
protectedvirtual

◆ TestMoveToAdditive()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveToAdditive ( )
protectedvirtual

◆ TestMoveToInstant()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveToInstant ( )
protectedvirtual

◆ TestMoveToRandom()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveToRandom ( )
protectedvirtual

◆ TestMoveToSubtractive()

override void MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveToSubtractive ( )
protectedvirtual

◆ UpdateSpringValue() [1/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.UpdateSpringValue ( )
protectedvirtual

Updates the spring's target value

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ UpdateSpringValue() [2/2]

override void MoreMountains.Feedbacks.MMSpringVector4< T >.UpdateSpringValue ( float  deltaTime)
virtual

Member Data Documentation

◆ _returnCurrentValue

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >._returnCurrentValue
protected

◆ _returnTargetValue

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >._returnTargetValue
protected

◆ _returnVelocity

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >._returnVelocity
protected

◆ BumpAmountRandomValueMax

Vector2 MoreMountains.Feedbacks.MMSpringVector4< T >.BumpAmountRandomValueMax = new Vector4(20f, 20f, 20f, 20f)

the maximum vector from which to pick a random value when calling BumpRandom()

◆ BumpAmountRandomValueMin

Vector2 MoreMountains.Feedbacks.MMSpringVector4< T >.BumpAmountRandomValueMin = new Vector4(-20f, -20f, -20f, -20f)

the minimum vector from which to pick a random value when calling BumpRandom()

◆ BumpToToolbar

bool MoreMountains.Feedbacks.MMSpringVector4< T >.BumpToToolbar

◆ Channel

the channel to listen to - has to match the one on the feedback

◆ ChannelMode

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

◆ MMChannelDefinition

MMChannel MoreMountains.Feedbacks.MMSpringVector4< T >.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

◆ MoveToRandomValueMax

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToRandomValueMax = new Vector4(2f, 2f, 2f, 2f)

the maximum vector from which to pick a random value when calling MoveToRandom()

◆ MoveToRandomValueMin

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToRandomValueMin = new Vector4(-2f, -2f, -2f, -2f)

the minimum vector from which to pick a random value when calling MoveToRandom()

◆ MoveToToolbar

bool MoreMountains.Feedbacks.MMSpringVector4< T >.MoveToToolbar

◆ OtherControlsToToolbar

bool MoreMountains.Feedbacks.MMSpringVector4< T >.OtherControlsToToolbar

◆ SeparateAxis

bool MoreMountains.Feedbacks.MMSpringVector4< T >.SeparateAxis = false

◆ SpringVector4

◆ SpringW

◆ SpringX

◆ SpringY

◆ SpringZ

◆ Target

◆ TestBumpAmount

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.TestBumpAmount = new Vector4(75f, 100f, 50f, 25f)

the amount by which to bump this spring when interacting with the Bump debug button in its inspector

◆ TestMoveToValue

Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.TestMoveToValue = new Vector4(2f, 2f, 2f, 2f)

the value to move this spring to when interacting with any of the MoveTo debug buttons in its inspector

◆ TimeScaleMode

whether this spring should run on scaled time (and be impacted by time scale changes) or unscaled time (and not be impacted by time scale changes)

◆ UnifiedSpring

Property Documentation

◆ CurrentValue

override Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.CurrentValue
getset

◆ DeltaTime

float MoreMountains.Feedbacks.MMSpringVector4< T >.DeltaTime
get

◆ LowVelocity

override bool MoreMountains.Feedbacks.MMSpringVector4< T >.LowVelocity
get

◆ TargetValue

override Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.TargetValue
getset

◆ TargetVector4

virtual Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.TargetVector4
getset

◆ Velocity

override Vector4 MoreMountains.Feedbacks.MMSpringVector4< T >.Velocity
getset

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