Class AbstractTwoStateLerpTransition

All Implemented Interfaces:
StateOwner
Direct Known Subclasses:
FadeTransitionState, FrozenTransitionState

public abstract class AbstractTwoStateLerpTransition extends AbstractTransitionState implements StateOwner
An abstract transition state that blends between two other states.
  • Constructor Details

    • AbstractTwoStateLerpTransition

      protected AbstractTwoStateLerpTransition(String targetState, double fadeTime, AbstractTwoStateLerpTransition.BlendType type)
      Construct a new AbstractTwoStateLerpTransition.
      Parameters:
      targetState - the name of the steady state we want the Animation Layer to be in at the end of the transition.
      fadeTime - the amount of time we should take to do the transition.
      type - the way we should interpolate the weighting during the transition.
  • Method Details

    • getStateA

      public AbstractFiniteState getStateA()
    • setStateA

      public void setStateA(AbstractFiniteState stateA)
      Parameters:
      stateA - sets the start state. Updates the state's owner to point to this transition.
    • getStateB

      public AbstractFiniteState getStateB()
    • setStateB

      public void setStateB(AbstractFiniteState stateB)
      Parameters:
      stateB - sets the end state. Updates the state's owner to point to this transition.
    • setFadeTime

      public void setFadeTime(double fadeTime)
    • getFadeTime

      public double getFadeTime()
    • setBlendType

      public void setBlendType(AbstractTwoStateLerpTransition.BlendType type)
    • getBlendType

    • setStart

      protected void setStart(double start)
    • getStart

      protected double getStart()
    • setPercent

      protected void setPercent(double percent)
    • getPercent

      protected double getPercent()
    • update

      public void update(double globalTime, AnimationLayer layer)
      Description copied from class: AbstractFiniteState
      Update this state using the current global time.
      Specified by:
      update in class AbstractFiniteState
      Parameters:
      globalTime - the current global time.
      layer - the layer this state belongs to.
    • getCurrentSourceData

      public Map<String,? extends Object> getCurrentSourceData(AnimationManager manager)
      Specified by:
      getCurrentSourceData in class AbstractFiniteState
      Parameters:
      manager - animation manager
      Returns:
      the current map of source channel data for this layer.
    • replaceState

      public void replaceState(AbstractFiniteState currentState, AbstractFiniteState newState)
      Description copied from interface: StateOwner
      Replace the given current state with the given new state
      Specified by:
      replaceState in interface StateOwner
      Parameters:
      currentState - the state to replace
      newState - the state to replace it with.