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.FX; /* w w w . ja va 2 s . co m*/ import java.util.Iterator; import java.util.LinkedList; public class FXManager { private LinkedList<FX> fx_; /** * Constructor */ public FXManager() { fx_ = new LinkedList<FX>(); } /** * Add a new FX to manage * @param newFX */ void add(FX newFX) { fx_.add(newFX); } public void update() { Iterator<FX> it = fx_.iterator(); while ( it.hasNext() ) { FX currFX = it.next(); currFX.update(); if ( currFX.ended() ) { it.remove(); } } } public void render() { for ( FX f : fx_ ) { f.draw(); } } /** * Remove all FXs */ public void clear() { fx_.clear(); } }