Back to project page LucyTheMoocher.
The source code is released under:
MIT License
If you think the Android project LucyTheMoocher listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lucythemoocher.sounds; //w w w .ja v a 2s .c o m public abstract class SoundsState { static final int MTL_NORMAL = 4; static final int MTL_QUICK = 2; protected SoundManager context_; protected int mesuresToLive_; protected int mesures_; public SoundsState(SoundManager context, int mesuresToLive) { context_ = context; mesuresToLive_ = mesuresToLive; mesures_ = 0; } protected void changeState(SoundsState newState) { context_.changeState(newState); } void changeMesure() { mesures_++; mesuresToLive_--; } /** * When the ambiance is slowly going more and more active */ void increaseNormal() { if ( mesuresToLive_ > MTL_NORMAL ) { mesuresToLive_ = MTL_NORMAL; } } /** * When the ambiance is quickly going more and more active */ void increaseQuick() { if ( mesuresToLive_ > MTL_QUICK ) { mesuresToLive_ = MTL_QUICK; } } /** * When the ambiance is slowly going less and less active */ void decreaseNormal() { if ( mesuresToLive_ > MTL_NORMAL ) { mesuresToLive_ = MTL_NORMAL; } } /** * When the ambiance is quickly going less and less active */ void decreaseQuickly() { if ( mesuresToLive_ > MTL_QUICK ) { mesuresToLive_ = MTL_QUICK; } } }