mobile new summoning sickness icon

This commit is contained in:
Anthony Calosa
2024-10-05 12:20:16 +08:00
parent 5ce506c5ab
commit f14de828ea
5 changed files with 25 additions and 5 deletions

View File

@@ -92,6 +92,7 @@ public class Forge implements ApplicationListener {
private static boolean destroyThis = false;
public static String extrawide = "default";
public static float heigtModifier = 0.0f;
public static float deltaTime = 0f;
private static boolean isloadingaMatch = false;
public static boolean autoAIDeckSelection = false;
public static boolean showFPS = false;
@@ -713,6 +714,7 @@ public class Forge implements ApplicationListener {
}
}
}
deltaTime = 0f;
}
}
});
@@ -849,6 +851,10 @@ public class Forge implements ApplicationListener {
ForgeAnimation.advanceAll();
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); // Clear the screen.
//set delta for rotation
deltaTime += Gdx.graphics.getDeltaTime();
if (deltaTime > 22.5f)
deltaTime = 0f;
FContainer screen = currentScreen;

View File

@@ -177,6 +177,7 @@ public class FSkin {
Forge.getAssets().loadTexture(getDefaultSkinFile("adv_logo.png"), new TextureLoader.TextureParameter());
Forge.getAssets().loadTexture(getDefaultSkinFile("cover.png"));
Forge.getAssets().loadTexture(getDefaultSkinFile("overlay_alpha.png"));
Forge.getAssets().loadTexture(getDefaultSkinFile("spiral.png"));
Forge.getAssets().loadTexture(getDefaultSkinFile("splatter.png"));
if (splashScreen != null) {

View File

@@ -59,6 +59,8 @@ import forge.model.FModel;
import forge.screens.match.MatchController;
import forge.toolbox.FList;
import static forge.assets.FSkin.getDefaultSkinFile;
public class CardRenderer {
public enum CardStackPosition {
Top,
@@ -818,7 +820,7 @@ public class CardRenderer {
g.setAlphaComposite(0.6f);
}
if (onbattlefield && onTop) {
drawAbilityIcons(g, card, cx, cy, cw, cx + ((cw * 2) / 2.3f), cy, cw / 5.5f, cw / 5.7f, showAbilityIcons(card));
drawAbilityIcons(g, card, cx, cy, cw, ch, cx + ((cw * 2) / 2.3f), cy, cw / 5.5f, cw / 5.7f, showAbilityIcons(card));
} else if (canShow && !onbattlefield && showAbilityIcons(card)) {
//draw indicator for flash or can be cast at instant speed, enabled if show ability icons is enabled
String keywordKey = card.getCurrentState().getKeywordKey();
@@ -875,7 +877,7 @@ public class CardRenderer {
g.setAlphaComposite(oldAlpha);
}
public static void drawAbilityIcons(Graphics g, CardView card, float cx, float cy, float cw, float abiX, float abiY, float abiScale, float abiSpace, boolean showAbilityIcons) {
public static void drawAbilityIcons(Graphics g, CardView card, float cx, float cy, float cw, float ch, float abiX, float abiY, float abiScale, float abiSpace, boolean showAbilityIcons) {
float abiCount = 0;
//show token indicator as status
if (card.isToken()) {
@@ -884,10 +886,20 @@ public class CardRenderer {
abiCount += 1;
}
if (card.isSick()) {
Texture spiral = Forge.getAssets().getTexture(getDefaultSkinFile("spiral.png"));
if (spiral != null) {
float newX = card.isTapped() ? cx + cw / 4.5f : cx;
float newY = card.isTapped() ? cy + cw / 4.75f : cy;
g.startRotateTransform(newX + cw / 2f, newY + ch / 2, -(Forge.deltaTime * 16f));
g.drawImage(spiral, newX, newY, cw, ch);
g.endTransform();
} else {
//old indicator
CardFaceSymbols.drawSymbol("summonsick", g, abiX, abiY, cw / 4.7f, cw / 4.7f);
abiY += abiSpace + 1.7f;
abiCount += 1;
}
}
if (card.isPhasedOut()) {
CardFaceSymbols.drawSymbol("phasing", g, abiX, abiY, cw / 4.7f, cw / 4.7f);
abiY += abiSpace + 1.7f;

View File

@@ -63,6 +63,7 @@ public abstract class FScreen extends FContainer {
}
public void onActivate() {
Forge.startContinuousRendering();
}
public void onSwitchAway(Callback<Boolean> canSwitchCallback) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB