Back to project page fireflies_android.
The source code is released under:
MIT License
If you think the Android project fireflies_android 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 donothingbox.game.controller; /* w w w.j a v a2 s.co m*/ import donothingbox.game.view.GameLayout; /* * Static functions let anyone call hudcontroller methods. I tend to prefer this way over event listening, but longer term testing may prove otherwise . . . * * Upside seems to be cleaner dispatch code, and central mgmt. Downside is more code required to insure cleanup and rebuild without causing mem leaks * */ public class HUDController { public static GameLayout sGameLayout; private HUDController(){} public static void init(GameLayout gameLayout) { sGameLayout = gameLayout; } public static void setPointCounter(int points){ System.out.println("updating points: " + sGameLayout.mScoreText); sGameLayout.mScoreText.setText(Integer.toString(points)); } }