Normand Briere
2017-05-07 314b34423070cf127464da79a53cddf6b1c38587
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package aurelienribon.tweenengine;
 
/**
 * TweenCallbacks are used to trigger actions at some specific times. They are
 * used in both Tweens and Timelines. The moment when the callback is
 * triggered depends on its registered triggers:
 * <p/>
 *
 * <b>BEGIN</b>: right after the delay (if any)<br/>
 * <b>START</b>: at each iteration beginning<br/>
 * <b>END</b>: at each iteration ending, before the repeat delay<br/>
 * <b>COMPLETE</b>: at last END event<br/>
 * <b>BACK_BEGIN</b>: at the beginning of the first backward iteration<br/>
 * <b>BACK_START</b>: at each backward iteration beginning, after the repeat delay<br/>
 * <b>BACK_END</b>: at each backward iteration ending<br/>
 * <b>BACK_COMPLETE</b>: at last BACK_END event
 * <p/>
 *
 * <pre> {@code
 * forward :      BEGIN                                   COMPLETE
 * forward :      START    END      START    END      START    END
 * |--------------[XXXXXXXXXX]------[XXXXXXXXXX]------[XXXXXXXXXX]
 * backward:      bEND  bSTART      bEND  bSTART      bEND  bSTART
 * backward:      bCOMPLETE                                 bBEGIN
 * }</pre>
 *
 * @see Tween
 * @see Timeline
 * @author Aurelien Ribon | http://www.aurelienribon.com/
 */
public interface TweenCallback {
   public static final int BEGIN = 0x01;
   public static final int START = 0x02;
   public static final int END = 0x04;
   public static final int COMPLETE = 0x08;
   public static final int BACK_BEGIN = 0x10;
   public static final int BACK_START = 0x20;
   public static final int BACK_END = 0x40;
   public static final int BACK_COMPLETE = 0x80;
   public static final int ANY_FORWARD = 0x0F;
   public static final int ANY_BACKWARD = 0xF0;
   public static final int ANY = 0xFF;
 
   public void onEvent(int type, BaseTween<?> source);
}