Coroutine协程
来源:互联网 发布:淘宝直通车要怎么开 编辑:程序博客网 时间:2024/05/16 05:41
物体定时运动
private Vector 3v = new Vector3();
private float speed = 0.0375f;
void start()
{
StartCoroutine(Routine());
}
void FixedUpdate()
{
transform.position +=v;
}
IEnumerator Routine()
{
v.z=speed;
v.x =0;
yield reutrn new WaitForSeconds(3f);
v.z=0;
v.x=-speed;
yield reutrn new WaitForSeconds(3f);
v.z=-speed;
v.x=0;yield return new WaitForSeconds(3f);
v.z=0;
v.x=speed;
yield return new WaitForSeconds(3f);
StartCoroutine(Routine());
}
}
0 0
- Coroutine 协程
- Coroutine(协程)
- coroutine协程
- Coroutine协程
- 协程coroutine
- Gevent 协程(coroutine)
- Boost coroutine 协程
- Lua 协程 coroutine
- 协程coroutine资料更新
- 协程(coroutine)
- tornado协程(coroutine)原理
- lua协程coroutine
- tornado.gen.coroutine-协程
- Unity协程(Coroutine)
- Unity Coroutine协程
- unity “协程”Coroutine
- 协程--Coroutine小记
- Boost coroutine 协程
- eclipse 属性文件编辑插件
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- javaee学习之路(二十五)javascript
- Android中关于Volley的使用(一)认识Volley的架构
- 2015.4.14深复制体验
- Coroutine协程
- C#连接数据库
- 黄金版Apple Watch将在中国大卖
- VOIP开源项目源码地址
- C#review
- Java中内存管理
- VS2012中出现“无法启动程序...debug\abc.exe,系统找不到指定文件”的问题!
- 电脑窗口设置绿豆沙
- PHP 调用webservice接口