Android Open Source - fireflies_android H U D Controller






From Project

Back to project page fireflies_android.

License

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.

Java Source Code

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));
  }
}




Java Source Code List

com.donothingbox.fireflies_android.CoreApp.java
com.donothingbox.fireflies_android.DynamicActivity.java
com.donothingbox.fireflies_android.GameSurfaceActivity.java
com.donothingbox.fireflies_android.MainActivity.java
donothingbox.game.controller.AudioController.java
donothingbox.game.controller.GameThread.java
donothingbox.game.controller.HUDController.java
donothingbox.game.controller.StateController.java
donothingbox.game.model.DepthSortComparator.java
donothingbox.game.utils.BitmapUtils.java
donothingbox.game.utils.Utils.java
donothingbox.game.view.CustomDrawableView.java
donothingbox.game.view.FireflySprite.java
donothingbox.game.view.GameLayout.java
donothingbox.game.view.GameSurfaceView.java
donothingbox.game.view.Sprite.java