Exemple #1
0
  public Sprite(
      BufferedImage img,
      Controller c,
      int width,
      int height,
      TextureHolder th,
      int currenttexid,
      Vector2f pos) {
    TextureUtils util = new TextureUtils();
    imgdata = util.loadtexture(img);

    parent = c;
    any = true;
    this.th = th;
    texture = img;

    modelmatrix.translate(pos);
    this.currenttexid = currenttexid;

    this.width = width;
    this.height = height;
    this.pos = pos;
    datafb = getData(this.pos, width, height, currenttexid);
    indices = getIndices(0);
  }
Exemple #2
0
  public Sprite(BufferedImage img, Controller c, int width, int height, Vector2f pos) {
    TextureUtils util = new TextureUtils();
    imgdata = util.loadtexture(img);

    parent = c;
    any = true;

    texture = img;
    setPos(0.0f, -7.0f);

    modelmatrix.translate(pos);

    this.width = width;
    this.height = height;
    this.pos = pos;
    datafb = getData(this.pos, width, height);
    indices = getIndices(0);
  }