void Update () {
if(Input .GetKeyDown (KeyCode .W ))
{
StartCoroutine ("Test");
}
}
IEnumerator Test()
{
while (Cube1 .position .x<)
{
Cube1 .Translate (transform .right **Time .deltaTime );
yield return null;
}
yield return new WaitForSeconds();
while (Cube2 .position .x<)
{
Cube2 .Translate (transform .right **Time .deltaTime );
yield return null;
}
}
相关文章
- 04-05unity 协同
- 04-05Unity Package Manager
- 04-05Unity笔记之凤凰模拟器
- 04-05查找(获得)与存在整理 unity笔记59
- 04-05【Unity】用代码给按钮动态添加点击事件
- 04-05Unity Dx9 Occlusion Query plugin
- 04-05DrawMeshInstanced在Unity2018上不生效
- 04-05Unity 报错之 The same field name is serialized multiple times in the class or its parent class.
- 04-05Unity3D Shader官方教程翻译(十九)----Shader语法,编写表面着色器
- 04-05Unity之Avatar原理