Rev 731 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package com.gebauz.PonPonChun.game.entities;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.gebauz.Bauzoid.graphics.sprite.Sprite;
import com.gebauz.PonPonChun.game.GameConsts;
import com.gebauz.PonPonChun.game.GameLogic;
public class Background
extends Entity
{
private Sprite mBackground =
null;
public Background
(GameLogic gameLogic
)
{
super(gameLogic
);
}
@
Override
public void init
()
{
Texture bgTexture =
new Texture
(Gdx.
files.
internal("data/textures/landscape.png"));
mBackground =
new Sprite
(getGraphics
(), bgTexture
);
mBackground.
pivotX =
0;
mBackground.
pivotY =
0;
mBackground.
x =
0;
mBackground.
y =
0;
mBackground.
w = GameConsts.
VIRTUAL_SCREEN_WIDTH;
mBackground.
h = GameConsts.
VIRTUAL_SCREEN_HEIGHT;
}
@
Override
public void exit
()
{
if (mBackground
!=
null)
{
mBackground.
dispose();
mBackground =
null;
}
}
@
Override
public void update
(float deltaTime
)
{
}
@
Override
public void render
()
{
mBackground.
render();
}
}