Back to project page FooTD.
The source code is released under:
GNU General Public License
If you think the Android project FooTD 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 org.android.footd; /* ww w . ja v a 2s . c om*/ import org.anddev.andengine.entity.sprite.AnimatedSprite; import org.anddev.andengine.opengl.texture.region.TiledTextureRegion; import android.graphics.Point; public class GridObject extends AnimatedSprite { Point gridCoord; public GridObject(float pX, float pY, TiledTextureRegion pTiledTextureRegion) { super(pX, pY, pTiledTextureRegion); } public GridObject(Point gridCoord, TiledTextureRegion pTiledTextureRegion) { super(convertGridPointToFloatPoint(gridCoord).x, convertGridPointToFloatPoint(gridCoord).y, pTiledTextureRegion); this.gridCoord = gridCoord; } public static FloatPoint convertGridPointToFloatPoint(Point gridCoord){ FloatPoint floatPoint = new FloatPoint( Level.GRID_X + Level.CELL_SIZE * gridCoord.x, Level.GRID_Y + Level.CELL_SIZE * gridCoord.y ); return floatPoint; } }