Interface TimingTarget

All Known Implementing Classes:
PropertySetter, TimingTargetAdapter, TimingTrigger

public interface TimingTarget
This interface provides the methods which are called by Animator during the course of a timing sequence. Applications that wish to receive timing events will either create a subclass of TimingTargetAdapter and override or they can create or use an implementation of TimingTarget. A TimingTarget can be passed into the constructor of Animator or set later with the Animator.addTarget(TimingTarget) method. Any Animator may have multiple TimingTargets.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the Animator's animation begins.
    void
    end()
    Called when the Animator's animation ends
    void
    Called when the Animator repeats the animation cycle
    void
    timingEvent(float fraction)
    This method will receive all of the timing events from an Animator during an animation.
  • Method Details

    • timingEvent

      void timingEvent(float fraction)
      This method will receive all of the timing events from an Animator during an animation. The fraction is the percent elapsed (0 to 1) of the current animation cycle.
      Parameters:
      fraction - the fraction of completion between the start and end of the current cycle. Note that on reversing cycles (Animator.Direction.BACKWARD) the fraction decreases from 1.0 to 0 on backwards-running cycles. Note also that animations with a duration of INFINITE will call timingEvent with an undefined value for fraction, since there is no fraction that makes sense if the animation has no defined length.
      See Also:
    • begin

      void begin()
      Called when the Animator's animation begins. This provides a chance for targets to perform any setup required at animation start time.
    • end

      void end()
      Called when the Animator's animation ends
    • repeat

      void repeat()
      Called when the Animator repeats the animation cycle