1 |
d333eb6b
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
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 |
e458a4ba
|
Leszek Koltunski
|
package org.distorted.library.message;
|
21 |
6a06a912
|
Leszek Koltunski
|
|
22 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23 |
a4835695
|
Leszek Koltunski
|
|
24 |
|
|
/**
|
25 |
6a06a912
|
Leszek Koltunski
|
* Defines all possible events a class implementing the {@link EffectListener} interface can receive.
|
26 |
|
|
*/
|
27 |
|
|
|
28 |
|
|
public enum EffectMessage
|
29 |
|
|
{
|
30 |
|
|
/**
|
31 |
|
|
* The effect has been removed. This can happen if:
|
32 |
|
|
* <ul>
|
33 |
cacc63de
|
Leszek Koltunski
|
* <li> someone explicitly removed the effect with a call to {@link org.distorted.library.DistortedEffects#abortEffect(long)}
|
34 |
e8c81a8e
|
Leszek Koltunski
|
* (or one of the other 'abort' methods)
|
35 |
c6e1c219
|
Leszek Koltunski
|
* <li> the interpolation of the effect has finished and the end result is equal to the effect's unity.
|
36 |
6a06a912
|
Leszek Koltunski
|
* </ul>
|
37 |
|
|
*/
|
38 |
|
|
EFFECT_REMOVED,
|
39 |
|
|
|
40 |
|
|
/**
|
41 |
|
|
* Interpolation of the effect has finished.
|
42 |
|
|
* <p>
|
43 |
568b29d8
|
Leszek Koltunski
|
* If you set up an interpolated effect and set its Dynamic to do 3.5 interpolations of 1000 ms each
|
44 |
e8c81a8e
|
Leszek Koltunski
|
* with calls to {@link org.distorted.library.type.Dynamic#setCount(float)} and {@link org.distorted.library.type.Dynamic#setDuration(long)},
|
45 |
6a06a912
|
Leszek Koltunski
|
* then you are going to get this message exactly once after 3.5*1000 = 3500 milliseconds when the interpolation
|
46 |
|
|
* finishes. You will never get this message if you set the effect to go on indefinitely with a call to
|
47 |
e8c81a8e
|
Leszek Koltunski
|
* {@link org.distorted.library.type.Dynamic#setCount(float)} where float=0.0f.
|
48 |
6a06a912
|
Leszek Koltunski
|
* <p>
|
49 |
c6e1c219
|
Leszek Koltunski
|
* If then the end effect is equal to the effect's unity, then immediately after this message you
|
50 |
6a06a912
|
Leszek Koltunski
|
* will also get a EFFECT_REMOVED message.
|
51 |
|
|
*/
|
52 |
cacc63de
|
Leszek Koltunski
|
EFFECT_FINISHED
|
53 |
6a06a912
|
Leszek Koltunski
|
}
|
54 |
|
|
|
55 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|