mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 08:36:38 +00:00
Make stamina consumption classes public so others can use.
This commit is contained in:
parent
032db81e07
commit
a7c1f85579
@ -0,0 +1,15 @@
|
||||
package emu.grasscutter.game.managers.StaminaManager;
|
||||
|
||||
public class Consumption {
|
||||
public ConsumptionType consumptionType;
|
||||
public int amount;
|
||||
|
||||
public Consumption(ConsumptionType ct, int a) {
|
||||
consumptionType = ct;
|
||||
amount = a;
|
||||
}
|
||||
|
||||
public Consumption(ConsumptionType ct) {
|
||||
this(ct, ct.amount);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package emu.grasscutter.game.managers.StaminaManager;
|
||||
|
||||
public enum ConsumptionType {
|
||||
None(0),
|
||||
|
||||
// consume
|
||||
CLIMB_START(-500),
|
||||
CLIMBING(-150),
|
||||
CLIMB_JUMP(-2500),
|
||||
SPRINT(-1800),
|
||||
DASH(-360),
|
||||
FLY(-60),
|
||||
SWIM_DASH_START(-200),
|
||||
SWIM_DASH(-200),
|
||||
SWIMMING(-80),
|
||||
FIGHT(0),
|
||||
|
||||
// restore
|
||||
STANDBY(500),
|
||||
RUN(500),
|
||||
WALK(500),
|
||||
STANDBY_MOVE(500),
|
||||
POWERED_FLY(500);
|
||||
|
||||
public final int amount;
|
||||
|
||||
ConsumptionType(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package emu.grasscutter.game.managers;
|
||||
package emu.grasscutter.game.managers.StaminaManager;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.game.entity.EntityAvatar;
|
||||
@ -35,48 +35,8 @@ public class StaminaManager {
|
||||
private int staminaRecoverDelay = 0;
|
||||
private boolean isInSkillMove = false;
|
||||
|
||||
private enum ConsumptionType {
|
||||
None(0),
|
||||
|
||||
// consume
|
||||
CLIMB_START(-500),
|
||||
CLIMBING(-150),
|
||||
CLIMB_JUMP(-2500),
|
||||
SPRINT(-1800),
|
||||
DASH(-360),
|
||||
FLY(-60),
|
||||
SWIM_DASH_START(-200),
|
||||
SWIM_DASH(-200),
|
||||
SWIMMING(-80),
|
||||
FIGHT(0),
|
||||
|
||||
// restore
|
||||
STANDBY(500),
|
||||
RUN(500),
|
||||
WALK(500),
|
||||
STANDBY_MOVE(500),
|
||||
POWERED_FLY(500);
|
||||
|
||||
public final int amount;
|
||||
|
||||
ConsumptionType(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
|
||||
private class Consumption {
|
||||
public ConsumptionType consumptionType;
|
||||
public int amount;
|
||||
|
||||
public Consumption(ConsumptionType ct, int a) {
|
||||
consumptionType = ct;
|
||||
amount = a;
|
||||
}
|
||||
|
||||
public Consumption(ConsumptionType ct) {
|
||||
this(ct, ct.amount);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getIsInSkillMove() {
|
||||
return isInSkillMove;
|
@ -22,7 +22,7 @@ import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.inventory.Inventory;
|
||||
import emu.grasscutter.game.mail.Mail;
|
||||
import emu.grasscutter.game.mail.MailHandler;
|
||||
import emu.grasscutter.game.managers.StaminaManager;
|
||||
import emu.grasscutter.game.managers.StaminaManager.StaminaManager;
|
||||
import emu.grasscutter.game.managers.SotSManager;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.EntityType;
|
||||
|
Loading…
Reference in New Issue
Block a user