Java 类org.newdawn.slick.geom.TexCoordGenerator 实例源码

项目:trashjam2017    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:Progetto-C    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:BaseClient    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:GPVM    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:SpaceStationAlpha    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:cretion    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}
项目:slick2d-maven    文件:TexturePaintTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    poly.addPoint(120, 120);
    poly.addPoint(420, 100);
    poly.addPoint(620, 420);
    poly.addPoint(300, 320);

    image = new Image("testdata/rocks.png");

    texPaint = new TexCoordGenerator() {
        public Vector2f getCoordFor(float x, float y) {
            float tx = (texRect.getX() - x) / texRect.getWidth();
            float ty = (texRect.getY() - y) / texRect.getHeight();

            return new Vector2f(tx,ty);
        }
    };
}