1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2016 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Distorted. //
|
5
|
// //
|
6
|
// Distorted is free software: you can redistribute it and/or modify //
|
7
|
// it under the terms of the GNU General Public License as published by //
|
8
|
// the Free Software Foundation, either version 2 of the License, or //
|
9
|
// (at your option) any later version. //
|
10
|
// //
|
11
|
// Distorted is distributed in the hope that it will be useful, //
|
12
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
13
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
14
|
// GNU General Public License for more details. //
|
15
|
// //
|
16
|
// You should have received a copy of the GNU General Public License //
|
17
|
// along with Distorted. If not, see <http://www.gnu.org/licenses/>. //
|
18
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19
|
|
20
|
package org.distorted.library.message;
|
21
|
|
22
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23
|
|
24
|
import org.distorted.library.main.DistortedEffects;
|
25
|
|
26
|
/**
|
27
|
* Defines all possible events a class implementing the {@link EffectListener} interface can receive.
|
28
|
*/
|
29
|
|
30
|
public enum EffectMessage
|
31
|
{
|
32
|
/**
|
33
|
* The effect has been removed. This can happen if:
|
34
|
* <ul>
|
35
|
* <li> someone explicitly removed the effect with a call to {@link DistortedEffects#abortById(long)}
|
36
|
* (or one of the other 'abort' methods)
|
37
|
* <li> the interpolation of the effect has finished and the end result is equal to the effect's unity.
|
38
|
* </ul>
|
39
|
*/
|
40
|
EFFECT_REMOVED,
|
41
|
|
42
|
/**
|
43
|
* Interpolation of the effect has finished.
|
44
|
* <p>
|
45
|
* If you set up an interpolated effect and set its Dynamic to do 3.5 interpolations of 1000 ms each
|
46
|
* with calls to {@link org.distorted.library.type.Dynamic#setCount(float)} and {@link org.distorted.library.type.Dynamic#setDuration(long)},
|
47
|
* then you are going to get this message exactly once after 3.5*1000 = 3500 milliseconds when the interpolation
|
48
|
* finishes. You will never get this message if you set the effect to go on indefinitely with a call to
|
49
|
* {@link org.distorted.library.type.Dynamic#setCount(float)} where float=0.0f.
|
50
|
* <p>
|
51
|
* If then the end effect is equal to the effect's unity, then immediately after this message you
|
52
|
* will also get a EFFECT_REMOVED message.
|
53
|
*/
|
54
|
EFFECT_FINISHED
|
55
|
}
|
56
|
|
57
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|