-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathParticleInfluencer.java
More file actions
66 lines (55 loc) · 1.63 KB
/
Copy pathParticleInfluencer.java
File metadata and controls
66 lines (55 loc) · 1.63 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package tonegod.emitter.influencers;
import com.jme3.export.Savable;
import org.jetbrains.annotations.NotNull;
import tonegod.emitter.particle.ParticleData;
/**
* The interface for implementing particle influencers.
*
* @author t0neg0d, JavaSaBr
*/
public interface ParticleInfluencer<T extends InfluencerData> extends Savable, Cloneable {
/**
* Gets name.
*
* @return the name of this influencer.
*/
@NotNull String getName();
/**
* This method clones the influencer instance.
*
* @return cloned instance
*/
@NotNull ParticleInfluencer clone();
/**
* Update loop for the particle influencer
*
* @param particleData The particle to update
* @param tpf The time since last frame
*/
void update(@NotNull ParticleData particleData, T influencerData, float tpf);
/**
* Called when a particle is emitted.
*
* @param particleData The particle being emitted
*/
void initialize(@NotNull ParticleData particleData, T influencerData);
/**
* Called once the life span of the particle has been reached.
*
* @param particleData The particle that was removed
*/
void reset(@NotNull ParticleData particleData);
/**
* Enables/disables the influencer without removing it from the chain. It is worth noting that
* initialize can still be used whether or not the influencer has been disabled.
*
* @param enable the enable
*/
void setEnabled(boolean enable);
/**
* Returns if the influencer is currently enabled
*
* @return the boolean
*/
boolean isEnabled();
}