@Override protected void createChildren() { arcsBg = new SkinnedBlock( 1, 1, Assets.ARCS_BG ); arcsBg.offsetTo( 0, offsB ); add( arcsBg ); arcsFg = new SkinnedBlock( 1, 1, Assets.ARCS_FG ); arcsFg.offsetTo( 0, offsF ); add( arcsFg ); }
public void size( float w, float h ) { this.width = w; this.height = h; updateFrame(); updateVertices(); } }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
public void scale( float x, float y ) { scaleX = x; scaleY = y; updateFrame(); }
@Override public void update() { super.update(); water.offset( 0, -5 * Game.elapsed ); }
@Override public void draw() { Blending.disable(); super.draw(); Blending.enable(); }
@Override protected void createChildren() { arcsBg = new SkinnedBlock( 1, 1, Assets.ARCS_BG ){ @Override protected NoosaScript script() { return NoosaScriptNoLighting.get(); } @Override public void draw() { //arch bg has no alpha component, this improves performance Blending.disable(); super.draw(); Blending.enable(); } }; arcsBg.autoAdjust = true; arcsBg.offsetTo( 0, offsB ); add( arcsBg ); arcsFg = new SkinnedBlock( 1, 1, Assets.ARCS_FG ){ @Override protected NoosaScript script() { return NoosaScriptNoLighting.get(); } }; arcsFg.autoAdjust = true; arcsFg.offsetTo( 0, offsF ); add( arcsFg ); }
@Override public void update() { super.update(); offset(0, Game.elapsed * scrollSpeed); } };
bg.scale(4, 4); add(bg);
public void size( float w, float h ) { this.width = w; this.height = h; updateFrame(); updateVertices(); } }
public SkinnedBlock( float width, float height, Object tx ) { super( tx ); texture.wrap( Texture.REPEAT, Texture.REPEAT ); size( width, height ); }
public void offsetTo( float x, float y ) { offsetX = x; offsetY = y; updateFrame(); }
@Override public void update() { super.update(); water.offset( 0, -5 * Game.elapsed ); }
@Override public void draw() { //arch bg has no alpha component, this improves performance Blending.disable(); super.draw(); Blending.enable(); } };
@Override protected void createChildren() { arcsBg = new SkinnedBlock( 1, 1, Assets.ARCS_BG ){ @Override protected NoosaScript script() { return NoosaScriptNoLighting.get(); } @Override public void draw() { //arch bg has no alpha component, this improves performance Blending.disable(); super.draw(); Blending.enable(); } }; arcsBg.autoAdjust = true; arcsBg.offsetTo( 0, offsB ); add( arcsBg ); arcsFg = new SkinnedBlock( 1, 1, Assets.ARCS_FG ){ @Override protected NoosaScript script() { return NoosaScriptNoLighting.get(); } }; arcsFg.autoAdjust = true; arcsFg.offsetTo( 0, offsF ); add( arcsFg ); }
@Override public void update() { super.update(); offset(0, Game.elapsed * scrollSpeed); } };
bg.scale(4, 4); add(bg);