This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 11th, 2013  |  syntax: Java  |  size: 5.34 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package com.reed.sidescroller;
  2.  
  3. import com.badlogic.gdx.Gdx;
  4. import com.badlogic.gdx.graphics.Texture;
  5. import com.badlogic.gdx.graphics.g2d.TextureRegion;
  6.  
  7. public class Assets {
  8.         //Textures
  9.         public static Texture everything;
  10.         //blocks
  11.         public static TextureRegion grassAndDirt;
  12.         public static TextureRegion grass;
  13.         public static TextureRegion plainBlock;
  14.         public static TextureRegion brownBlock;
  15.         public static TextureRegion waterBlock;
  16.         public static TextureRegion dirtBlock;
  17.         public static TextureRegion woodBlock;
  18.         public static TextureRegion stoneTall;
  19.         public static TextureRegion stoneShort;
  20.         public static TextureRegion wallTall;
  21.         public static TextureRegion wallShort;
  22.         //building stuff
  23.         public static TextureRegion roofSouthEast;
  24.         public static TextureRegion roofEast;
  25.         public static TextureRegion roofSouthWest;
  26.         public static TextureRegion roofNorthEast;
  27.         public static TextureRegion roofSouth;
  28.         public static TextureRegion roofNorthWest;
  29.         public static TextureRegion roofWest;
  30.         public static TextureRegion roofNorth;
  31.         public static TextureRegion rampEast;
  32.         public static TextureRegion rampNorth;
  33.         public static TextureRegion rampSouth;
  34.         public static TextureRegion rampWest;
  35.         public static TextureRegion window;
  36.         //trees
  37.         public static TextureRegion uglyTree;
  38.         public static TextureRegion shortTree;
  39.         public static TextureRegion treeTall;
  40.         //Gems n stuff
  41.         public static TextureRegion rock;
  42.         public static TextureRegion star;
  43.         public static TextureRegion greenGem;
  44.         public static TextureRegion goldGem;
  45.         public static TextureRegion blueGem;
  46.         //Chest and Doors
  47.         public static TextureRegion chestClosed;
  48.         public static TextureRegion chestLid;
  49.         public static TextureRegion chestOpen;
  50.         public static TextureRegion doorClosed;
  51.         public static TextureRegion doorOpen;
  52.         //judging off of hat thing
  53.         public static TextureRegion girlDarkBlue;
  54.         public static TextureRegion boyBlackHair;
  55.         public static TextureRegion girlPinkHair;
  56.         public static TextureRegion girlWhiteCat;
  57.         public static TextureRegion girlPurplePrincess;
  58.         //random
  59.         public static TextureRegion ladyBug;
  60.         public static TextureRegion key;
  61.         public static TextureRegion speechBubble;
  62.  
  63.         public static Texture loadTexture (String file) {
  64.                 return new Texture(Gdx.files.internal(file));
  65.         }
  66.  
  67.         public static void load () {
  68.                 everything = new Texture(Gdx.files.internal("everything.png"));
  69.                
  70.                 //Made from left to right from everything image
  71.                 grassAndDirt = new TextureRegion(everything, 0, 0, 101, 171);          
  72.                 greenGem = new TextureRegion(everything, 101, 0, 101, 171);
  73.                 plainBlock = new TextureRegion(everything, 202, 0, 101, 171);
  74.                 rock = new TextureRegion(everything, 303, 0, 101, 171);
  75.                 roofSouthEast = new TextureRegion(everything, 404, 0, 101, 171);
  76.                 star = new TextureRegion(everything, 505, 0, 101, 171);
  77.                 uglyTree = new TextureRegion(everything, 606, 0, 101, 171);
  78.                 woodBlock = new TextureRegion(everything, 707, 0, 101, 171);
  79.                 chestClosed = new TextureRegion(everything, 0, 171, 101, 171);
  80.                 doorClosed = new TextureRegion(everything, 101, 171, 101, 171);
  81.                 goldGem = new TextureRegion(everything, 202, 171, 101, 171);
  82.                 rampEast = new TextureRegion(everything, 303, 171, 101, 171);
  83.                 roofEast = new TextureRegion(everything, 404, 171, 101, 171);
  84.                 roofSouthWest = new TextureRegion(everything, 505, 171, 101, 171);
  85.                 stoneTall = new TextureRegion(everything, 606, 171, 101, 171);
  86.                 wallTall = new TextureRegion(everything, 707, 171, 101, 171);
  87.                 girlDarkBlue = new TextureRegion(everything, 0, 342, 101, 171);
  88.                 chestLid = new TextureRegion(everything, 101, 342, 101, 171);
  89.                 doorOpen = new TextureRegion(everything, 202, 342, 101, 171);
  90.                 grass = new TextureRegion(everything, 303, 342, 101, 171);
  91.                 rampNorth = new TextureRegion(everything, 404, 342, 101, 171);
  92.                 roofNorthEast = new TextureRegion(everything, 505, 342, 101, 171);
  93.                 roofSouth = new TextureRegion(everything, 606, 342, 101, 171);
  94.                 stoneShort = new TextureRegion(everything, 707, 342, 101, 171);
  95.                 wallShort = new TextureRegion(everything, 808, 342, 101, 171);
  96.                 boyBlackHair = new TextureRegion(everything, 0, 513, 101, 171);
  97.                 girlPinkHair = new TextureRegion(everything, 101, 513, 101, 171);
  98.                 chestOpen = new TextureRegion(everything, 303, 513, 101, 171);
  99.                 ladyBug = new TextureRegion(everything, 404, 513, 101, 171);
  100.                 rampSouth = new TextureRegion(everything, 505, 513, 101, 171);
  101.                 roofNorthWest = new TextureRegion(everything, 606, 513, 101, 171);
  102.                 roofWest = new TextureRegion(everything, 707, 513, 101, 171);
  103.                 shortTree = new TextureRegion(everything, 808, 513, 101, 171);
  104.                 waterBlock = new TextureRegion(everything, 909, 513, 101, 171);
  105.                 brownBlock = new TextureRegion(everything, 0, 684, 101, 171);
  106.                 girlWhiteCat = new TextureRegion(everything, 101, 684, 101, 171);
  107.                 girlPurplePrincess = new TextureRegion(everything, 202, 684, 101, 171);
  108.                 dirtBlock = new TextureRegion(everything, 303, 684, 101, 171);
  109.                 blueGem = new TextureRegion(everything, 404, 684, 101, 171);
  110.                 key = new TextureRegion(everything, 505, 684, 101, 171);
  111.                 rampWest = new TextureRegion(everything, 606, 684, 101, 171);
  112.                 roofNorth = new TextureRegion(everything, 707, 684, 101, 171);
  113.                 speechBubble = new TextureRegion(everything, 808, 684, 101, 171);
  114.                 treeTall = new TextureRegion(everything, 909, 684, 101, 171);
  115.                 window = new TextureRegion(everything, 1010, 684, 101, 171);
  116.                 System.out.println("assest");
  117.         }
  118. }
clone this paste RAW Paste Data