TopDown Engine
v4.1
|
Add this class to a GameObject to be able to control its position/rotation/scale individually and periodically, allowing it to "wiggle" (or just move however you want on a periodic basis) More...
Public Types | |
enum | UpdateModes { UpdateModes.Update, UpdateModes.FixedUpdate, UpdateModes.LateUpdate } |
the possible update modes More... | |
Public Member Functions | |
virtual void | WigglePosition (float duration) |
virtual void | WiggleRotation (float duration) |
virtual void | WiggleScale (float duration) |
virtual void | Initialization () |
On init we get the start values and trigger our coroutines for each property More... | |
virtual void | RestoreInitialValues () |
Public Attributes | |
UpdateModes | UpdateMode = UpdateModes.Update |
the selected update mode More... | |
bool | PositionActive = false |
whether or not position wiggle is active More... | |
bool | RotationActive = false |
whether or not rotation wiggle is active More... | |
bool | ScaleActive = false |
whether or not scale wiggle is active More... | |
WiggleProperties | PositionWiggleProperties |
all public info related to position wiggling More... | |
WiggleProperties | RotationWiggleProperties |
all public info related to rotation wiggling More... | |
WiggleProperties | ScaleWiggleProperties |
all public info related to scale wiggling More... | |
float | DebugWiggleDuration = 2f |
a debug duration used in conjunction with the debug buttons More... | |
Protected Member Functions | |
virtual void | WiggleValue (ref WiggleProperties property, ref InternalWiggleProperties internalProperties, float duration) |
virtual void | Start () |
On Start() we trigger the initialization More... | |
virtual void | InitializeRandomValues (ref WiggleProperties properties, ref InternalWiggleProperties internalProperties) |
Initializes internal properties of the specified wiggle value More... | |
virtual void | Update () |
Every frame we update our object's position, rotation and scale More... | |
virtual void | LateUpdate () |
Every frame we update our object's position, rotation and scale More... | |
virtual void | FixedUpdate () |
Every frame we update our object's position, rotation and scale More... | |
virtual void | ProcessUpdate () |
Meant to be executed at the selected UpdateMode More... | |
virtual bool | UpdateValue (bool valueActive, WiggleProperties properties, ref InternalWiggleProperties internalProperties) |
Computes the next Vector3 value for the specified property More... | |
float | ApplyFalloff (WiggleProperties properties) |
Applies a falloff to the computed value based on time spent and a falloff animation curve More... | |
virtual Vector3 | AnimateNoiseValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties) |
Animates a Vector3 value along a perlin noise More... | |
virtual Vector3 | AnimateCurveValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties) |
Animates a Vector3 value along a specified curve More... | |
virtual void | EvaluateCurve (AnimationCurve curve, float percent, Vector3 remapMin, Vector3 remapMax, ref Vector3 returnValue, WiggleProperties properties) |
virtual bool | MoveVector3TowardsTarget (ref Vector3 movedValue, WiggleProperties properties, ref Vector3 startValue, Vector3 initialValue, ref Vector3 destinationValue, ref float timeSinceLastPause, ref float timeSinceLastValueChange, ref Vector3 randomAmplitude, ref float randomFrequency, ref float pauseDuration, float frequency) |
Moves a vector3's values towards a target More... | |
virtual Vector3 | DetermineNewValue (WiggleProperties properties, Vector3 newValue, Vector3 initialValue, ref Vector3 startValue, ref Vector3 randomAmplitude, ref float randomFrequency, ref float pauseDuration, bool firstPlay=false) |
Picks a new target value More... | |
virtual float | RandomizeFloat (ref float randomizedFloat, float floatMin, float floatMax) |
Randomizes a float between bounds More... | |
virtual Vector3 | RandomizeVector3 (ref Vector3 randomizedVector, Vector3 vectorMin, Vector3 vectorMax) |
Randomizes a vector3 within bounds More... | |
Protected Attributes | |
InternalWiggleProperties | _positionInternalProperties |
InternalWiggleProperties | _rotationInternalProperties |
InternalWiggleProperties | _scaleInternalProperties |
Add this class to a GameObject to be able to control its position/rotation/scale individually and periodically, allowing it to "wiggle" (or just move however you want on a periodic basis)
|
strong |
|
protectedvirtual |
Animates a Vector3 value along a specified curve
internalProperties | |
properties |
|
protectedvirtual |
Animates a Vector3 value along a perlin noise
internalProperties | |
properties |
|
protected |
Applies a falloff to the computed value based on time spent and a falloff animation curve
newValue | |
properties |
|
protectedvirtual |
Picks a new target value
properties | |
newValue | |
initialValue | |
startValue | |
randomAmplitude | |
randomFrequency | |
pauseDuration |
|
protectedvirtual |
|
protectedvirtual |
Every frame we update our object's position, rotation and scale
|
virtual |
On init we get the start values and trigger our coroutines for each property
|
protectedvirtual |
Initializes internal properties of the specified wiggle value
properties | |
internalProperties |
|
protectedvirtual |
Every frame we update our object's position, rotation and scale
|
protectedvirtual |
Moves a vector3's values towards a target
movedValue | |
properties | |
startValue | |
initialValue | |
destinationValue | |
timeSinceLastPause | |
timeSinceLastValueChange | |
randomAmplitude | |
randomFrequency | |
pauseDuration | |
frequency |
|
protectedvirtual |
Meant to be executed at the selected UpdateMode
|
protectedvirtual |
Randomizes a float between bounds
randomizedFloat | |
floatMin | |
floatMax |
|
protectedvirtual |
Randomizes a vector3 within bounds
randomizedVector | |
vectorMin | |
vectorMax |
|
virtual |
|
protectedvirtual |
On Start() we trigger the initialization
|
protectedvirtual |
Every frame we update our object's position, rotation and scale
|
protectedvirtual |
Computes the next Vector3 value for the specified property
valueActive | |
properties | |
internalProperties |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
float MoreMountains.Feedbacks.MMWiggle.DebugWiggleDuration = 2f |
a debug duration used in conjunction with the debug buttons
bool MoreMountains.Feedbacks.MMWiggle.PositionActive = false |
whether or not position wiggle is active
WiggleProperties MoreMountains.Feedbacks.MMWiggle.PositionWiggleProperties |
all public info related to position wiggling
bool MoreMountains.Feedbacks.MMWiggle.RotationActive = false |
whether or not rotation wiggle is active
WiggleProperties MoreMountains.Feedbacks.MMWiggle.RotationWiggleProperties |
all public info related to rotation wiggling
bool MoreMountains.Feedbacks.MMWiggle.ScaleActive = false |
whether or not scale wiggle is active
WiggleProperties MoreMountains.Feedbacks.MMWiggle.ScaleWiggleProperties |
all public info related to scale wiggling
UpdateModes MoreMountains.Feedbacks.MMWiggle.UpdateMode = UpdateModes.Update |
the selected update mode