libGDX 使用 git 进行项目更新

libGDX project update with use of git

一个月前我在做一个libGDX项目,所以有几个新版本的框架。我读过,更新框架的文件很有用,但我有很多 类,很多资产。如何只更新框架到最新版本?

在官方wiki上,this是推荐的方式。

不过,我找到了一种新方法来做同样的事情。 如果您不想打开 gradle 文件,这可能是个好方法。

  1. 打开你的libgdx设置gdx-setup.jar文件(我的是目前最新的1.5.5)。

  2. 按照您为其他旧项目设置的方式设置参数。

  3. 确保将目标设置为与旧项目不同的位置(不要覆盖旧项目,因为您将需要它,并且是一个很好的备份)

  4. 在您使用的任何编辑器中打开项目。

这是重要的部分。你说你想保留你的旧类和资产

  1. 将您的资产和 类 从您以前的项目复制到新的 project.You 甚至可以从您的旧项目复制您的旧代码*;

注意:Libgdx 更新 1.5.5 更新了以下参数。如果您有任何适用于以下内容的内容,则需要重写

[1.5.5] -> Added iOS ARM-64 bit support for Bullet physics -> 3D Animation, NodeAnimation keyframes are separated into translation, rotation and scaling -> Added capability to enable color markup from inside skin json file. -> Exposed method ControllerManager#clearListeners on Controllers class -> Net#openURI now returns a boolean to indicate whether the uri was actually opened. -> DefaultShader now always combines material and environment attributes -> Added ShapeRenderer constructor to pass a custom shader program to ImmediateModeRenderer20. -> API Change: Group#toString now returns actor hierarchy. Group#print is gone. -> Added SpotLight class, see https://github.com/libgdx/libgdx/pull/2907 -> Added support for resolving file handles using classpaths (ClasspathFileHandleResolver)

希望对您有所帮助。