Android Open Source - squares Block






From Project

Back to project page squares.

License

The source code is released under:

GNU General Public License

If you think the Android project squares 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 com.mygdxgame.model;
//from  w w w.java  2s.  co  m
import com.badlogic.gdx.math.Vector2;

public class Block extends Entity {
  
  public static final float WIDTH = 1.25f;
  public static final float HEIGHT = 1.25f;
  
  public enum Color {
    RED, GREEN, YELLOW, BLUE
  }

  Color color;
  boolean pressed;
  
  public Block(Vector2 position, Color color) {
    super(position, WIDTH, HEIGHT);
    this.color = color;
    this.velocity = Vector2.Zero;
    pressed = false;
  }

  public Color getColor() {
    return this.color;
  }
  
  public void setPressed(boolean b){
    this.pressed = b;
  }
  
  public boolean isPressed(){
    return pressed;
  }

}




Java Source Code List

com.me.mygdxgame.Main.java
com.me.squaresgame.MainActivity.java
com.mygdxgame.MyGdxGame.java
com.mygdxgame.controller.WorldController.java
com.mygdxgame.model.Block.java
com.mygdxgame.model.Entity.java
com.mygdxgame.model.World.java
com.mygdxgame.screens.GameScreen.java
com.mygdxgame.screens.MenuScreen.java
com.mygdxgame.screens.ScoreScreen.java
com.mygdxgame.screens.StatsScreen.java
com.mygdxgame.view.WorldRenderer.java