Back to project page tetris-android.
The source code is released under:
MIT License
If you think the Android project tetris-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 com.badlogic.androidgames.framework; //w w w . ja va 2 s . c om import com.badlogic.androidgames.framework.math.Rectangle; import com.badlogic.androidgames.framework.math.Vector2; public class GameObject { public final Vector2 position; public final Rectangle bounds; public GameObject(float x, float y, float width, float height) { this.position = new Vector2(x,y); this.bounds = new Rectangle(x-width/2, y-height/2, width, height); } }