fix(scene/transition): set opacity of from.root and to.root
This commit is contained in:
@ -55,7 +55,6 @@ public class Game extends ApplicationAdapter {
|
|||||||
transition.render(batch);
|
transition.render(batch);
|
||||||
batch.end();
|
batch.end();
|
||||||
// Handle stage drawing for UI elements
|
// Handle stage drawing for UI elements
|
||||||
stage.act(Gdx.graphics.getDeltaTime());
|
|
||||||
stage.draw();
|
stage.draw();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,9 +51,11 @@ public class Transition extends Scene {
|
|||||||
log.trace("Transition opacities - from: {}, to: {}", fromOpacity, toOpacity);
|
log.trace("Transition opacities - from: {}, to: {}", fromOpacity, toOpacity);
|
||||||
batch.setColor(1, 1, 1, fromOpacity);
|
batch.setColor(1, 1, 1, fromOpacity);
|
||||||
from.root.setVisible(true);
|
from.root.setVisible(true);
|
||||||
|
from.root.setColor(1, 1, 1, fromOpacity);
|
||||||
from.render(batch);
|
from.render(batch);
|
||||||
batch.setColor(1, 1, 1, toOpacity);
|
batch.setColor(1, 1, 1, toOpacity);
|
||||||
to.root.setVisible(true);
|
to.root.setVisible(true);
|
||||||
|
to.root.setColor(1, 1, 1, toOpacity);
|
||||||
to.render(batch);
|
to.render(batch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user