Back to project page SevenWonders.
The source code is released under:
Apache License
If you think the Android project SevenWonders listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * //from w w w . j a v a 2 s .c o m */ package skylight1.sevenwonders.levels; import skylight1.sevenwonders.GameState; import skylight1.sevenwonders.services.SoundTracks; import skylight1.sevenwonders.view.GameMessagesDisplay; import skylight1.sevenwonders.view.SevenWondersGLRenderer; import skylight1.sevenwonders.view.GameMessagesDisplay.GameEvent; import android.os.Handler; final class ProtectionAction implements CollisionAction { private static final int TIME_INVINCIBLE_MILLIS = 30000; @Override public void collision(Handler aUiHandler, SevenWondersGLRenderer aSevenWondersGLRenderer) { // TODO add a different sound here SoundTracks.getInstance().play(SoundTracks.SPELL); final GameState gameState = aSevenWondersGLRenderer.getGameState(); gameState.setRemainingInvincibilityTimeMillis(TIME_INVINCIBLE_MILLIS); GameMessagesDisplay.postMessage(GameEvent.INVINCIBLE); } }