SHARE
TWEET

Untitled

a guest Nov 20th, 2016 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.kingclub2.jelly;
  2.  
  3. import com.badlogic.gdx.graphics.Texture;
  4. import com.badlogic.gdx.graphics.g2d.Sprite;
  5.  
  6. public class Ghost extends Sprite {
  7.     public GhostType type;
  8.     public float moveX = 0, moveY = 0;
  9.  
  10.     public Ghost(GhostType t, Texture tex, float x, float y) {
  11.         super();
  12.         this.type = t;
  13.         super.setTexture(tex);
  14.         super.setPosition(x, y);
  15.         super.setOriginCenter();
  16.     }
  17.  
  18.     public void update(float delta) {
  19.         super.translate(moveX * delta, moveY * delta);
  20.     }
  21.  
  22.     public void dispose() {
  23.         this.getTexture().dispose();
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top