摘要: 1. 尽量避免每帧处理比如:function Update() { DoSomeThing(); }可改为每5帧处理一次:function Update() { if(Time.frameCount % 5 == 0) { DoSomeThing(); } }2. 定时重复处理用 InvokeRepeating 函数实现比如,启动0.5秒后每隔1秒执行一次 DoSomeThing 函数:function Start() { InvokeRepeating("DoSomeThing", 0.5, 1.0); }functionInvokeRepeating(methodNam 阅读全文
posted @ 2013-11-15 11:14 martianzone 阅读(328) 评论(0) 推荐(0) 编辑