假设我的gulp任务决定什么都不做 - 我该返回什么?
public class SplashScreen implements Screen{
private final PuzzleGame app;
private Stage stage;
private Image splashImage;
public SplashScreen(final PuzzleGame app) {
this.app = app;
this.stage = new Stage(new FitViewport(PuzzleGame.V_WIDTH, PuzzleGame.V_HEIGHT, app.camera));
Gdx.input.setInputProcessor(stage);
Texture splashTex = new Texture(Gdx.files.internal("img/splash.png"));
splashImage = new Image(splashTex);
splashImage.setPosition(stage.getWidth() / 2, stage.getHeight() / 2);
stage.addActor(splashImage);
}
@Override
public void show() {
}
@Override
public void render(float delta) {
Gdx.gl.glClearColor(.25f, .25f, .25f, 1f);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
update(delta);
stage.draw();
}
private void update(float delta) {
stage.act(delta);
}
@Override
public void resize(int width, int height) {
stage.getViewport().update(width, height, false);
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void hide() {
}
@Override
public void dispose() {
stage.dispose();
}
}
在其他情况下,我可能会使用done()回调,但我不认为我可以在这里使用它,我可能会返回一个流。