Turning my process into Events.
Alright lets say for example I have this code in my process from doing that d claw's tut...
Code:
if(dclaws == 3) {
dclawed();
}
if(dclaws == 2) {
startAnimation(2068);
dclawed2();
}
if(dclaws == 1) {
dclawed2();
actionInterval = getbattleTimer() + getbattleTimer()/2;
}
if(dclaws > 0) {
dclaws -= 1;
}
Now I would turn that into this??
Code:
public void DragonClaw) {
EventManager.getSingleton().addEvent(3000, new Event() {
public void execute(EventContainer c) {
if(dclaws == 3) {
dclawed();
} else {
c.stop();
}
}
});
}
Please someone direct me in the right way with Events I want to get that shit out of my process.