DEADSOFTWARE

Add assets loader and player skin
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / Assets.java
1 package ru.deadsoftware.cavecraft;
3 import com.badlogic.gdx.Gdx;
4 import com.badlogic.gdx.graphics.Texture;
5 import com.badlogic.gdx.graphics.g2d.Sprite;
6 import com.badlogic.gdx.graphics.g2d.TextureRegion;
8 public class Assets {
10 public static Texture charTexture;
11 public static Sprite[] playerSprite = new Sprite[2];
13 public static void load() {
14 charTexture = new Texture(Gdx.files.internal("char.png"));
15 playerSprite[0] = new Sprite(new TextureRegion(charTexture, 0,0,8,30));
16 playerSprite[0].flip(false,true);
17 playerSprite[1] = new Sprite(new TextureRegion(charTexture, 8,0,8,30));
18 playerSprite[1].flip(false,true);
19 }
21 }