Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.willchill.game.entity;
- import java.io.FileInputStream;
- import java.io.IOException;
- import org.newdawn.slick.opengl.Texture;
- import org.newdawn.slick.opengl.TextureLoader;
- public class Entity {
- public int x;
- public int y;
- public Texture texture = null;
- public Entity(String path, int x, int y){
- this.x = x;
- this.y = y;
- try {
- texture = TextureLoader.getTexture("PNG", new FileInputStream("res/player.png"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public void move(int xa, int ya){
- this.x += xa;
- this.y += ya;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment