mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-14 19:04:53 +00:00
77 lines
1.4 KiB
Java
77 lines
1.4 KiB
Java
package noppes.npcs.api.handler.data;
|
|
|
|
import java.util.function.BiConsumer;
|
|
import java.util.function.Consumer;
|
|
|
|
public interface IAnimation {
|
|
|
|
IAnimationData getParent();
|
|
|
|
IFrame currentFrame();
|
|
|
|
IFrame[] getFrames();
|
|
|
|
IAnimation setFrames(IFrame[] frames);
|
|
|
|
IAnimation clearFrames();
|
|
|
|
IAnimation addFrame(IFrame frame);
|
|
|
|
IAnimation addFrame(int index, IFrame frame);
|
|
|
|
IAnimation removeFrame(IFrame frame);
|
|
|
|
IAnimation setName(String name);
|
|
|
|
String getName();
|
|
|
|
IAnimation setSpeed(float speed);
|
|
|
|
float getSpeed();
|
|
|
|
IAnimation setSmooth(byte smooth);
|
|
|
|
byte isSmooth();
|
|
|
|
IAnimation doWhileStanding(boolean whileStanding);
|
|
|
|
boolean doWhileStanding();
|
|
|
|
IAnimation doWhileMoving(boolean whileMoving);
|
|
|
|
boolean doWhileMoving();
|
|
|
|
IAnimation doWhileAttacking(boolean whileAttacking);
|
|
|
|
boolean doWhileAttacking();
|
|
|
|
IAnimation setLoop(int loopAtFrame);
|
|
|
|
int loop();
|
|
|
|
IAnimation save();
|
|
|
|
int getID();
|
|
|
|
/**
|
|
* Do not use this unless you know what you are changing. Dangerous to change.
|
|
*/
|
|
void setID(int id);
|
|
|
|
long getTotalTime();
|
|
|
|
boolean hasData(String key);
|
|
|
|
Object getData(String key);
|
|
|
|
IAnimation setData(String key, Object v);
|
|
|
|
IAnimation removeData(String key);
|
|
|
|
IAnimation onStart(Consumer<IAnimation> task);
|
|
|
|
IAnimation onFrame(BiConsumer<Integer, IAnimation> task);
|
|
|
|
IAnimation onEnd(Consumer<IAnimation> task);
|
|
}
|