Back to project page ninja-trials.
The source code is released under:
Apache License
If you think the Android project ninja-trials 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.madgear.ninjatrials.utils; //from w w w. ja v a 2s.co m /** * @author oldskool73 */ public class AutoHorizontalParallaxBackground extends ParallaxBackground2d { private final float mParallaxChangePerSecond; // =========================================================== // Constructors // =========================================================== public AutoHorizontalParallaxBackground (final float pRed, final float pGreen, final float pBlue, final float pParallaxChangePerSecond) { super(pRed, pGreen, pBlue); this.mParallaxChangePerSecond = pParallaxChangePerSecond; } // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== @Override public void onUpdate(final float pSecondsElapsed) { super.onUpdate(pSecondsElapsed); this.mParallaxValueX += this.mParallaxChangePerSecond * pSecondsElapsed; } }