public Vertex setSubTexture(SubTexture texture) { this.texture = texture; switch (this.index) { case 0: this.tx = texture.getXTopLoc(); this.ty = texture.getYLoc(); break; case 1: this.tx = texture.getXTopLoc(); this.ty = texture.getYTopLoc(); break; case 2: this.tx = texture.getXLoc(); this.ty = texture.getYTopLoc(); break; case 3: this.tx = texture.getXLoc(); this.ty = texture.getYLoc(); } return this; }
public int getTextureHeight() { return texture.getParent().getHeight(); }
public int getTextureWidth() { return texture.getParent().getWidth(); }