SHARE
TWEET

Untitled

a guest Sep 27th, 2014 214 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class SplashState extends State {
  2.  
  3.         private TweenManager tm;
  4.         private Texture tex;
  5.         private Sprite logo;
  6.        
  7.         public SplashState(GSM gsm) {
  8.                 super(gsm);
  9.                 Tween.registerAccessor(Sprite.class, new SpriteAccessor());
  10.                 tm = new TweenManager();
  11.                 tex = new Texture(Gdx.files.internal("imgs/logo.png"));
  12.                 logo = new Sprite(tex);
  13.        
  14.                 Tween.set(logo, SpriteAccessor.ALPHA).target(0).start(tm);
  15.                 Tween.to(logo, SpriteAccessor.ALPHA, 2).target(2).repeatYoyo(1, 2).start(tm);
  16.         }
  17.        
  18.         @Override
  19.         protected void render() {
  20.                 sb.setProjectionMatrix(cam.combined);
  21.                 sb.begin();
  22.                 logo.draw(sb);
  23.                 sb.end();
  24.         }
  25.  
  26.         @Override
  27.         protected void update() {
  28.                 tm.update(1/60f);
  29.         }
  30.  
  31.         @Override
  32.         protected void handleInput() {
  33.  
  34.         }
  35.  
  36. }
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