TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMSpringVector3Component< T > Class Template Referenceabstract

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

Inheritance diagram for MoreMountains.Feedbacks.MMSpringVector3Component< T >:
MoreMountains.Feedbacks.MMSpringComponentBase MoreMountains.Tools.MMEventListener< T > MoreMountains.Tools.MMMonoBehaviour MoreMountains.Tools.MMEventListenerBase MoreMountains.Feedbacks.MMSpringPosition MoreMountains.Feedbacks.MMSpringRectTransformPosition MoreMountains.Feedbacks.MMSpringRotation MoreMountains.Feedbacks.MMSpringScale

Public Member Functions

virtual void MoveTo (Vector3 newValue)
virtual void MoveToAdditive (Vector3 newValue)
virtual void MoveToSubtractive (Vector3 newValue)
virtual void MoveToRandom ()
virtual void MoveToInstant (Vector3 newValue)
virtual void MoveToRandom (Vector3 min, Vector3 max)
virtual void Bump (Vector3 bumpAmount)
virtual void BumpRandom ()
virtual void BumpRandom (Vector3 min, Vector3 max)
override void Stop ()
 Stops all value movement on this spring.
override void RestoreInitialValue ()
 Restores this spring's initial value.
override void ResetInitialValue ()
 Sets the current value of this spring as its new initial value, overriding the previous one.
override void Finish ()
 Moves this spring to its destination and disables it.
void OnMMEvent (MMSpringVector3Event springEvent)
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.
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< T >
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)
MMChannelModes ChannelMode = MMChannelModes.Int
int Channel = 0
 the channel to listen to - has to match the one on the feedback
MMChannel MMChannelDefinition = null
MMSpringVector3 SpringVector3 = new MMSpringVector3()
Vector3 MoveToRandomValueMin = new Vector3(-2f, -2f, -2f)
 the minimum vector from which to pick a random value when calling MoveToRandom()
Vector3 MoveToRandomValueMax = new Vector3(2f, 2f, 2f)
 the maximum vector from which to pick a random value when calling MoveToRandom()
Vector3 BumpAmountRandomValueMin = new Vector3(-20f, 20f, -20f)
 the minimum vector from which to pick a random value when calling BumpRandom()
Vector3 BumpAmountRandomValueMax = new Vector3(20f, 20f, 20f)
 the maximum vector from which to pick a random value when calling BumpRandom()
Vector3 TestMoveToValue = new Vector3(2f, 2f, 2f)
 the value to move this spring to when interacting with any of the MoveTo debug buttons in its inspector
bool MoveToToolbar
Vector3 TestBumpAmount = new Vector3(75f, 100f, 50f)
 the amount by which to bump this spring when interacting with the Bump debug button in its inspector
bool BumpToToolbar
bool OtherControlsToToolbar
Public Attributes inherited from MoreMountains.Feedbacks.MMSpringComponentBase
UnityEvent OnEquilibriumReached

Protected Member Functions

override void UpdateSpringValue ()
 Updates the spring's target value.
override void Initialization ()
 Performs initialization for this spring.
virtual void ApplyValue (Vector3 newValue)
override void GrabCurrentValue ()
 Grabs the current value on the spring's target.
override void Awake ()
 On awake we self disable.
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.
virtual void Activate ()
 Activates this component.
virtual void SelfDisable ()
 Disables this component.

Properties

override bool LowVelocity [get]
float DeltaTime [get]
virtual Vector3 TargetVector3 [get, set]
Properties inherited from MoreMountains.Feedbacks.MMSpringComponentBase
virtual bool LowVelocity [get]
 whether or not this spring has reached a low enough velocity to self disable

Additional Inherited Members

Public Types inherited from MoreMountains.Feedbacks.MMSpringComponentBase
enum  TimeScaleModes { Unscaled , Scaled }
 the different possible timescale modes for the spring More...
Protected Attributes inherited from MoreMountains.Feedbacks.MMSpringComponentBase
float _velocityLowThreshold = 0.001f

Detailed Description

A spring component used to pilot Vector3 values on a target.

Type Constraints
T :Component 

Member Function Documentation

◆ ApplyValue()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.ApplyValue ( Vector3 newValue)
protectedvirtual

◆ Awake()

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

On awake we self disable.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Bump()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.Bump ( Vector3 bumpAmount)
virtual

◆ BumpRandom() [1/2]

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

◆ BumpRandom() [2/2]

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.BumpRandom ( Vector3 min,
Vector3 max )
virtual

◆ Finish()

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

Moves this spring to its destination and disables it.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ GrabCurrentValue()

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

Grabs the current value on the spring's target.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Initialization()

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

Performs initialization for this spring.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ MoveTo()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveTo ( Vector3 newValue)
virtual

◆ MoveToAdditive()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToAdditive ( Vector3 newValue)
virtual

◆ MoveToInstant()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToInstant ( Vector3 newValue)
virtual

◆ MoveToRandom() [1/2]

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

◆ MoveToRandom() [2/2]

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToRandom ( Vector3 min,
Vector3 max )
virtual

◆ MoveToSubtractive()

virtual void MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToSubtractive ( Vector3 newValue)
virtual

◆ OnDestroy()

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

◆ OnMMEvent()

void MoreMountains.Feedbacks.MMSpringVector3Component< T >.OnMMEvent ( MMSpringVector3Event springEvent)

◆ ResetInitialValue()

override void MoreMountains.Feedbacks.MMSpringVector3Component< 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()

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

Restores this spring's initial value.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ Stop()

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

Stops all value movement on this spring.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

◆ TestBump()

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

◆ TestBumpRandom()

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

◆ TestMoveTo()

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

◆ TestMoveToAdditive()

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

◆ TestMoveToInstant()

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

◆ TestMoveToRandom()

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

◆ TestMoveToSubtractive()

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

◆ UpdateSpringValue()

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

Updates the spring's target value.

Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.

Member Data Documentation

◆ BumpAmountRandomValueMax

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.BumpAmountRandomValueMax = new Vector3(20f, 20f, 20f)

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

◆ BumpAmountRandomValueMin

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.BumpAmountRandomValueMin = new Vector3(-20f, 20f, -20f)

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

◆ BumpToToolbar

bool MoreMountains.Feedbacks.MMSpringVector3Component< T >.BumpToToolbar

◆ Channel

int MoreMountains.Feedbacks.MMSpringVector3Component< T >.Channel = 0

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

◆ ChannelMode

MMChannelModes MoreMountains.Feedbacks.MMSpringVector3Component< T >.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

◆ MMChannelDefinition

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

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToRandomValueMax = new Vector3(2f, 2f, 2f)

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

◆ MoveToRandomValueMin

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToRandomValueMin = new Vector3(-2f, -2f, -2f)

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

◆ MoveToToolbar

bool MoreMountains.Feedbacks.MMSpringVector3Component< T >.MoveToToolbar

◆ OtherControlsToToolbar

bool MoreMountains.Feedbacks.MMSpringVector3Component< T >.OtherControlsToToolbar

◆ SpringVector3

MMSpringVector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.SpringVector3 = new MMSpringVector3()

◆ Target

T MoreMountains.Feedbacks.MMSpringVector3Component< T >.Target

◆ TestBumpAmount

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.TestBumpAmount = new Vector3(75f, 100f, 50f)

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

◆ TestMoveToValue

Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.TestMoveToValue = new Vector3(2f, 2f, 2f)

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

◆ TimeScaleMode

TimeScaleModes MoreMountains.Feedbacks.MMSpringVector3Component< T >.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)

Property Documentation

◆ DeltaTime

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

◆ LowVelocity

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

◆ TargetVector3

virtual Vector3 MoreMountains.Feedbacks.MMSpringVector3Component< T >.TargetVector3
getset

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacks/Springs/Core/Components/MMSpringVector3Component.cs