Пример #1
0
  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;
  }
Пример #2
0
 public int getTextureHeight() {
   return texture.getParent().getHeight();
 }
Пример #3
0
 public int getTextureWidth() {
   return texture.getParent().getWidth();
 }