![]() |
TopDown Engine v4.3
|
A spring component used to pilot Vector2 values on a target More...
Public Member Functions | |
virtual void | MoveTo (Vector2 newValue) |
virtual void | MoveToAdditive (Vector2 newValue) |
virtual void | MoveToSubtractive (Vector2 newValue) |
virtual void | MoveToRandom () |
virtual void | MoveToInstant (Vector2 newValue) |
virtual void | MoveToRandom (Vector2 min, Vector2 max) |
virtual void | Bump (Vector2 bumpAmount) |
virtual void | BumpRandom () |
virtual void | BumpRandom (Vector2 min, Vector2 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 (MMSpringVector2Event springEvent) |
![]() | |
virtual void | SetVelocityLowThreshold (float threshold) |
Sets the threshold under which the spring will consider its velocity as too low and will self disable More... | |
![]() | |
void | OnMMEvent (T eventType) |
Public Attributes | |
T | 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 |
MMSpringVector2 | SpringVector2 = new MMSpringVector2() |
Vector2 | MoveToRandomValueMin = new Vector2(-2f, -2f) |
the minimum vector from which to pick a random value when calling MoveToRandom() More... | |
Vector2 | MoveToRandomValueMax = new Vector2(2f, 2f) |
the maximum vector from which to pick a random value when calling MoveToRandom() More... | |
Vector2 | BumpAmountRandomValueMin = new Vector2(-20f, -20f) |
the minimum vector from which to pick a random value when calling BumpRandom() More... | |
Vector2 | BumpAmountRandomValueMax = new Vector2(20f, 20f) |
the maximum vector from which to pick a random value when calling BumpRandom() More... | |
Vector2 | TestMoveToValue = new Vector2(2f, 2f) |
the value to move this spring to when interacting with any of the MoveTo debug buttons in its inspector More... | |
bool | MoveToToolbar |
Vector2 | TestBumpAmount = new Vector2(75f, 100f) |
the amount by which to bump this spring when interacting with the Bump debug button in its inspector More... | |
bool | BumpToToolbar |
bool | OtherControlsToToolbar |
![]() | |
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 (Vector2 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 () |
![]() | |
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... | |
Properties | |
override bool | LowVelocity [get] |
float | DeltaTime [get] |
virtual Vector2 | TargetVector2 [getset] |
![]() | |
virtual bool | LowVelocity [get] |
whether or not this spring has reached a low enough velocity to self disable More... | |
Additional Inherited Members | |
![]() | |
enum | TimeScaleModes { Unscaled , Scaled } |
the different possible timescale modes for the spring More... | |
![]() | |
float | _velocityLowThreshold = 0.001f |
A spring component used to pilot Vector2 values on a target
T | : | Component |
|
protectedvirtual |
|
protectedvirtual |
On awake we self disable
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Moves this spring to its destination and disables it
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Grabs the current value on the spring's target
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Performs initialization for this spring
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
void MoreMountains.Feedbacks.MMSpringVector2Component< T >.OnMMEvent | ( | MMSpringVector2Event | springEvent | ) |
|
virtual |
Sets the current value of this spring as its new initial value, overriding the previous one
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
virtual |
Restores this spring's initial value
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
virtual |
Stops all value movement on this spring
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
|
protectedvirtual |
Updates the spring's target value
Reimplemented from MoreMountains.Feedbacks.MMSpringComponentBase.
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.BumpAmountRandomValueMax = new Vector2(20f, 20f) |
the maximum vector from which to pick a random value when calling BumpRandom()
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.BumpAmountRandomValueMin = new Vector2(-20f, -20f) |
the minimum vector from which to pick a random value when calling BumpRandom()
bool MoreMountains.Feedbacks.MMSpringVector2Component< T >.BumpToToolbar |
int MoreMountains.Feedbacks.MMSpringVector2Component< T >.Channel = 0 |
the channel to listen to - has to match the one on the feedback
MMChannelModes MoreMountains.Feedbacks.MMSpringVector2Component< 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
MMChannel MoreMountains.Feedbacks.MMSpringVector2Component< 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
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.MoveToRandomValueMax = new Vector2(2f, 2f) |
the maximum vector from which to pick a random value when calling MoveToRandom()
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.MoveToRandomValueMin = new Vector2(-2f, -2f) |
the minimum vector from which to pick a random value when calling MoveToRandom()
bool MoreMountains.Feedbacks.MMSpringVector2Component< T >.MoveToToolbar |
bool MoreMountains.Feedbacks.MMSpringVector2Component< T >.OtherControlsToToolbar |
MMSpringVector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.SpringVector2 = new MMSpringVector2() |
T MoreMountains.Feedbacks.MMSpringVector2Component< T >.Target |
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.TestBumpAmount = new Vector2(75f, 100f) |
the amount by which to bump this spring when interacting with the Bump debug button in its inspector
Vector2 MoreMountains.Feedbacks.MMSpringVector2Component< T >.TestMoveToValue = new Vector2(2f, 2f) |
the value to move this spring to when interacting with any of the MoveTo debug buttons in its inspector
TimeScaleModes MoreMountains.Feedbacks.MMSpringVector2Component< 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)
|
get |
|
get |
|
getset |