Class AdaptiveFloatProperty
java.lang.Object
dev.prozilla.pine.common.property.VariableProperty<Float>
dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase<Float>
dev.prozilla.pine.common.property.adaptive.AdaptiveFloatProperty
- All Implemented Interfaces:
Animatable
An optimized adaptive property, that uses a primitive float value.
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase
animatedProperty, variablePropertyFields inherited from class dev.prozilla.pine.common.property.VariableProperty
random -
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveFloatProperty(float fixedValue) Creates a new property with a fixed value.AdaptiveFloatProperty(VariableProperty<Float> variableProperty) Creates a new property with a dynamic value. -
Method Summary
Modifier and TypeMethodDescriptionstatic AdaptiveFloatPropertyadapt(float value) Converts a float into an adaptive property.static AdaptiveFloatPropertyadapt(AdaptiveFloatProperty property) static AdaptiveFloatPropertyadapt(VariableProperty<Float> property) Converts any float property into an adaptive property.floatgetValue()Returns the value of this property.Methods inherited from class dev.prozilla.pine.common.property.adaptive.AdaptivePropertyBase
isAnimated, isDynamic, restartAnimation, updateAnimationMethods inherited from class dev.prozilla.pine.common.property.VariableProperty
exists, getValue, getValue, hasValue
-
Constructor Details
-
AdaptiveFloatProperty
Creates a new property with a dynamic value.- Parameters:
variableProperty- Variable property that determines the value of this property
-
AdaptiveFloatProperty
public AdaptiveFloatProperty(float fixedValue) Creates a new property with a fixed value.
-
-
Method Details
-
getValue
Description copied from class:VariablePropertyReturns the value of this property.- Specified by:
getValuein classVariableProperty<Float>- Returns:
- The value of this property.
-
getPrimitiveValue
public float getPrimitiveValue() -
adapt
Converts a float into an adaptive property.- Parameters:
value- The value of the property
-
adapt
-
adapt
Converts any float property into an adaptive property.- Parameters:
property- The property to adapt
-