LibGdx - 屏幕之间的转换 [英] LibGdx - Transition between Screens
问题描述
我正在尝试更改 Libgdx 屏幕之间的动画.我想编写我的自定义动画(淡入、淡出等).有人可以给我一个线索吗?我似乎在 Libgdx 代码中找不到转换的实现.
I'm trying to change the animation between Libgdx Screens. I want to write my custom animation (fade in, fade out, etc). Can someone give me a clue? I can't seem to find the implementation of the transition in the Libgdx code.
推荐答案
我已经使用 Scene2D 和通用补间引擎实现了一些滑动过渡.您可以在此处找到示例代码.
I've implemented some sliding transitions using Scene2D and the universal tween engine. You can find example code here.
http://www.netthreads.co.uk/2012/02/09/libgdx-scene2d-demo-with-scene-transitions/
更新:本文说明了我实现滑动过渡的方法.底部有一个链接,可将您带到此处的一组演示 https://github.com/alistairrutherford/libgdx-demos
Update: This article illustrates the approach I took to implement sliding transitions. There is a link at the bottom which takes you to a set of demos here https://github.com/alistairrutherford/libgdx-demos
有关于如何构建演示的明确说明,但您至少需要对 maven 以及如何设置有基本的了解.
There are clear instructions on how to build the demos but you will need to have at least a basic grasp of maven and how to set it up.
这篇关于LibGdx - 屏幕之间的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!