1

我正在制作一个统一的赛车游戏,比如 Temple Run,玩家需要不断地奔跑并收集水果/能量提升。我正在使用第三人默认建筑工人来完成这项工作。但是无法弄清楚要在脚本中调整什么以使其连续运行..帮助我在哪里需要更改它。

4

3 回答 3

0

Ok first of all you need animations. Then change them to loop and call them run or turn. then for part of the script.

function Update ()
{
     animation.Play("run");
}
于 2013-06-11T23:26:30.610 回答
0

看看类似的问题

于 2013-10-04T05:05:26.553 回答
0

我相信你应该看看这个脚本:Standard Assets\Character Controllers\Sources\Scripts\CharacterMotor.js.

最简单的部分是改为var sprint : boolean = false;设置true

如果您不需要步行代码,则必须清理该脚本中的更多代码以避免使用不必要的代码行。

于 2013-02-18T07:52:39.320 回答