Skip to content
Snippets Groups Projects
Commit f15d9dfc authored by Drahomír Karchňák's avatar Drahomír Karchňák
Browse files

#328 Added temporary rankup animation sound

parent 9cbf79b9
No related branches found
No related tags found
No related merge requests found
File added
......@@ -44,6 +44,7 @@ import cz.nic.tablexia.game.games.kidnapping.actions.WhileAction;
import cz.nic.tablexia.game.ranksystem.UserRankManager;
import cz.nic.tablexia.game.trophy.ITrophyDefinition;
import cz.nic.tablexia.loader.application.ApplicationAtlasManager;
import cz.nic.tablexia.loader.application.ApplicationExternalSoundManager;
import cz.nic.tablexia.loader.application.ApplicationFontManager;
import cz.nic.tablexia.loader.application.ApplicationInternalSoundManager;
import cz.nic.tablexia.loader.application.ApplicationTextManager;
......@@ -206,7 +207,7 @@ public abstract class AbstractTablexiaGame<T> extends AbstractTablexiaScreen<T>
private static final float SHINE_ROTATION = 67.8f;
private static final float SHINE_ROTATION_SPEED = 9;
private static final float SHINE_ROTATION_SPEED_DIFF = 2;
private static final float SHINE_FADE_TIME = 1f;
private static final float SHINE_FADE_TIME = 0.5f;
private static final float SHINE_ALPHA = 0.65f;
private static final Color[] SHINE_COLORS = new Color[] {
new Color(1, 1, 190/255f, SHINE_ALPHA),
......@@ -1224,7 +1225,7 @@ public abstract class AbstractTablexiaGame<T> extends AbstractTablexiaScreen<T>
);
//TODO - different sound...
ApplicationInternalSoundManager.getInstance().getSound(ApplicationInternalSoundManager.ALERT).play();
// ApplicationInternalSoundManager.getInstance().getSound(ApplicationInternalSoundManager.ALERT).play();
//Updates progress bar
rankProgress.setCurrXP(rankProgress.getCurrXP() + 1);
......@@ -1383,7 +1384,15 @@ public abstract class AbstractTablexiaGame<T> extends AbstractTablexiaScreen<T>
shines.addAction(
new SequenceAction(
Actions.delay(SLIDE_ANIMATION_TIME),
Actions.fadeIn(SHINE_FADE_TIME)
new ParallelAction(
Actions.fadeIn(SHINE_FADE_TIME),
Actions.run(new Runnable() {
@Override
public void run() {
ApplicationExternalSoundManager.getInstance().getSound(ApplicationExternalSoundManager.RANKUP).play();
}
})
)
)
);
}
......
......@@ -37,9 +37,12 @@ public class ApplicationExternalSoundManager extends TablexiaSoundManager implem
public static final String MAINMENU_OPEN = MAINMENU_PATH + "mainmenu_open.mp3";
public static final String MAINMENU_CLOSE = MAINMENU_PATH + "mainmenu_close.mp3";
public static final String RANKUP = "badge/rankup_sound.mp3";
public void load() {
loadSound(MAINMENU_OPEN);
loadSound(MAINMENU_CLOSE);
loadSound(RANKUP);
}
private String createAssetPath(String fileName) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment