Пример #1
0
 final void loadSprites() {
   Image[][] temp = sL.getSprite();
   System.arraycopy(temp[0], 0, sprite[0], 0, 3);
   System.arraycopy(temp[1], 0, sprite[1], 0, 3);
   System.arraycopy(temp[2], 0, sprite[2], 0, 3);
   System.arraycopy(temp[3], 0, sprite[3], 0, 3);
 }
Пример #2
0
 public Entity(int x, int y, String pathToSprite) {
   this.x = x;
   this.y = y;
   dx = 0;
   dy = 0;
   dir = 0;
   lastDir = 0;
   sL = new SpriteLoader(pathToSprite);
   sL.load();
   init();
   loadSprites();
 }