forked from Clones/Controlify
vibration conflict support - multiple vibrations can play at once
This commit is contained in:
@ -1,9 +1,18 @@
|
||||
package dev.isxander.controlify.rumble;
|
||||
|
||||
public interface RumbleEffect {
|
||||
RumbleState nextState();
|
||||
public interface RumbleEffect extends Comparable<RumbleEffect> {
|
||||
void tick();
|
||||
RumbleState currentState();
|
||||
|
||||
boolean isFinished();
|
||||
|
||||
int priority();
|
||||
int age();
|
||||
|
||||
@Override
|
||||
default int compareTo(RumbleEffect o) {
|
||||
int priorityCompare = Integer.compare(o.priority(), this.priority());
|
||||
if (priorityCompare != 0) return priorityCompare;
|
||||
return Integer.compare(this.age(), o.age());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user