Mutator.h
The state instantaneously changes to the next value.
static float StepTowards(float current, float destination, float step=.5f, Function f=Function::Linear)
Iteratively eases a value to another and returns the stepped value. This is known in other toolkits a...
void NewMutation(float when, float value, Function travelFunction)
Sets a new point of mutation.
The state changes to random values between the state at the start and the end state.
void OnStep()
Function that is called upon each Run iteration. Component Run()s are run before the entity's run fun...
Divides by the Value()
The state changes in a logarithmic manner to the next value.
Definition: AssetID.h:37
The state alters in a cubic manner to the next value.
void Loop(bool)
Sets whether or not to automatically restart after the final value has been reached.
Adds the Value()
The state transforms in a reverse-quadratic manner to the next value.
void Bind(float &, BindFunction f=BindFunction::Set)
Binds a reference to the Mutator.
float GetAt(float time)
Returns the Mutator's mutation value at a specified time.
Updates the value with the current Value(), replacing the old one.
Function
For constructing the Mutator's mutations, you must specify a mutation function. These are the various...
Definition: Mutator.h:68
The state linearly changes to the next value.
void SetMutationDestination(int mutationIndex, float newValue)
Sets a new destination value for the mutation.
The state sinusoidally changes to the next value.
The state quadratically transforms to the next value.
A piecewise function manager that changes inputs over time.
Definition: Mutator.h:62
Class that extends the functionality of an Entity, but as a removable and addable object...
Definition: Component.h:66
void NewRandomMutation(float when, float minValue, float MaxValue, Function travelFunction)
Like NewMutation(), except the destination value is random chosen upon start(). min / max bound the r...
Multiplies by the Value()
std::string GetInfo()
Returns a string containing human-readable information on the state of the component.
BindFunction
Tells how values should change when bound.
Definition: Mutator.h:150
Subtracts the Value()