Back to project page Layrd.
The source code is released under:
MIT License
If you think the Android project Layrd 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.Voltronics.game; /*from ww w.j av a 2 s . c o m*/ import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; public class GameObject { public Vector2 oldPosition; public Vector2 position; public Rectangle rectBounds; public Vector2 velocity; public Sprite sprite; public GameObject (float x, float y, float width, float height) { this.oldPosition = new Vector2(x, y); this.position = new Vector2(x, y); this.rectBounds = new Rectangle(x - width / 2, y - height / 2, width, height); velocity = new Vector2(); sprite = new Sprite(); } public void setSize(float x, float y){ rectBounds.setSize(x, y); sprite.setSize(x,y); } }