Class CustomTweenFunction

java.lang.Object
top.untold.frostlumen.core.tween.CustomTweenFunction
All Implemented Interfaces:
TweenFunction

public class CustomTweenFunction extends Object implements TweenFunction
  • Constructor Details

    • CustomTweenFunction

      public CustomTweenFunction(TweenFunction outOfRangeFunction)
  • Method Details

    • computeEased

      public double computeEased(double percent)
      Specified by:
      computeEased in interface TweenFunction
    • setSegment

      public CustomTweenFunction setSegment(double start, double end, TweenFunction function)
      在当前对象上增加一段, 直接使用给定的 function 作为该段的缓动函数 返回 this 以便继续链式配置
    • setSegment

      public CustomTweenFunction setSegment(double start, double end, TweenFunction nestedOutOfRangeFunction, Consumer<CustomTweenFunction> nestedConfigurator)
      在当前对象上增加一段, 并新建一个 CustomTweenFunction 作为该段的缓动函数 新对象的越界函数由 nestedOutOfRangeFunction 指定, 随后通过 nestedConfigurator 配置 返回 this, 嵌套对象的配置在回调内完成
    • setOutOfRangeFunction

      public CustomTweenFunction setOutOfRangeFunction(TweenFunction outOfRangeFunction)