mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
add delay to see attack animation
- add short delay to see player and mob attack animation before the duel starts
This commit is contained in:
@@ -662,22 +662,25 @@ public class MapStage extends GameStage {
|
||||
currentMob = mob;
|
||||
player.setAnimation(CharacterSprite.AnimationTypes.Attack);
|
||||
mob.setAnimation(CharacterSprite.AnimationTypes.Attack);
|
||||
SoundSystem.instance.play(SoundEffectType.Block, false);
|
||||
Gdx.input.vibrate(50);
|
||||
Forge.setCursor(null, Forge.magnifyToggle ? "1" : "2");
|
||||
SoundSystem.instance.play(SoundEffectType.ManaBurn, false);
|
||||
DuelScene duelScene = ((DuelScene) SceneType.DuelScene.instance);
|
||||
FThreads.invokeInEdtNowOrLater(() -> {
|
||||
if (!isLoadingMatch) {
|
||||
isLoadingMatch = true;
|
||||
Forge.setTransitionScreen(new TransitionScreen(() -> {
|
||||
duelScene.initDuels(player, mob);
|
||||
Forge.clearTransitionScreen();
|
||||
startPause(0.3f, () -> {
|
||||
if(isInMap && effect != null) duelScene.setDungeonEffect(effect);
|
||||
Forge.switchScene(SceneType.DuelScene.instance);
|
||||
});
|
||||
}, ScreenUtils.getFrameBufferTexture(), true, false));
|
||||
}
|
||||
startPause(0.8f, () -> {
|
||||
Forge.setCursor(null, Forge.magnifyToggle ? "1" : "2");
|
||||
SoundSystem.instance.play(SoundEffectType.ManaBurn, false);
|
||||
DuelScene duelScene = ((DuelScene) SceneType.DuelScene.instance);
|
||||
FThreads.invokeInEdtNowOrLater(() -> {
|
||||
if (!isLoadingMatch) {
|
||||
isLoadingMatch = true;
|
||||
Forge.setTransitionScreen(new TransitionScreen(() -> {
|
||||
duelScene.initDuels(player, mob);
|
||||
Forge.clearTransitionScreen();
|
||||
startPause(0.3f, () -> {
|
||||
if(isInMap && effect != null) duelScene.setDungeonEffect(effect);
|
||||
Forge.switchScene(SceneType.DuelScene.instance);
|
||||
});
|
||||
}, ScreenUtils.getFrameBufferTexture(), true, false));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -84,18 +84,21 @@ public class WorldStage extends GameStage implements SaveFileContent {
|
||||
if (player.collideWith(mob)) {
|
||||
player.setAnimation(CharacterSprite.AnimationTypes.Attack);
|
||||
mob.setAnimation(CharacterSprite.AnimationTypes.Attack);
|
||||
SoundSystem.instance.play(SoundEffectType.Block, false);
|
||||
Gdx.input.vibrate(50);
|
||||
Forge.setCursor(null, Forge.magnifyToggle ? "1" : "2");
|
||||
SoundSystem.instance.play(SoundEffectType.ManaBurn, false);
|
||||
DuelScene duelScene = ((DuelScene) SceneType.DuelScene.instance);
|
||||
FThreads.invokeInEdtNowOrLater(() -> {
|
||||
Forge.setTransitionScreen(new TransitionScreen(() -> {
|
||||
duelScene.initDuels(player, mob);
|
||||
Forge.clearTransitionScreen();
|
||||
startPause(0.3f, () -> Forge.switchScene(SceneType.DuelScene.instance));
|
||||
}, ScreenUtils.getFrameBufferTexture(), true, false));
|
||||
currentMob = mob;
|
||||
WorldSave.getCurrentSave().autoSave();
|
||||
startPause(0.8f, () -> {
|
||||
Forge.setCursor(null, Forge.magnifyToggle ? "1" : "2");
|
||||
SoundSystem.instance.play(SoundEffectType.ManaBurn, false);
|
||||
DuelScene duelScene = ((DuelScene) SceneType.DuelScene.instance);
|
||||
FThreads.invokeInEdtNowOrLater(() -> {
|
||||
Forge.setTransitionScreen(new TransitionScreen(() -> {
|
||||
duelScene.initDuels(player, mob);
|
||||
Forge.clearTransitionScreen();
|
||||
startPause(0.3f, () -> Forge.switchScene(SceneType.DuelScene.instance));
|
||||
}, ScreenUtils.getFrameBufferTexture(), true, false));
|
||||
currentMob = mob;
|
||||
WorldSave.getCurrentSave().autoSave();
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user