30 lines
543 B
Java
30 lines
543 B
Java
package speiger.src.coreengine.math.value;
|
|
|
|
public class ConstantValue extends Value
|
|
{
|
|
public static final IValue MINUS_ONE = new ConstantValue(-1F);
|
|
public static final IValue ZERO = new ConstantValue(0F);
|
|
public static final IValue ONE = new ConstantValue(1F);
|
|
|
|
final float value;
|
|
|
|
public ConstantValue(float value)
|
|
{
|
|
super(0F, 0F);
|
|
this.value = value;
|
|
update(-1F);
|
|
}
|
|
|
|
@Override
|
|
protected float calculateProgress(float time)
|
|
{
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
protected void onInitialValueSet()
|
|
{
|
|
finishProgress();
|
|
}
|
|
}
|