-
Notifications
You must be signed in to change notification settings - Fork 2
/
Effect.java
45 lines (34 loc) · 795 Bytes
/
Effect.java
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 com.coldwild.dodginghero.graph.effects;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Pool;
/**
* Created by comrad_gremlin on 9/9/2016.
*/
public abstract class Effect implements Pool.Poolable {
protected boolean isAlive;
protected float timeAlive;
public Effect()
{
isAlive = false;
timeAlive = 0;
}
@Override
public void reset() {
}
public void init(EffectEngine parent)
{
isAlive = true;
timeAlive = 0;
parent.add(this);
}
public void update(float delta)
{
timeAlive += delta;
}
public abstract void draw(SpriteBatch batch);
public boolean isAlive()
{
return isAlive;
}
public abstract void release();
}