14/07/02 01:45:44.05 +FRMTuKVe
>>134
実はそちらのページも見ていて、
"Invoke"を利用して書いてみたのですが、
動きませんでした。
下記の形だと"else"の場合も2秒後になってしまいます。。。
var obj:GameObject;
var script:window_control;
function Start () {
if(!obj){
obj=GameObject.FindGameObjectWithTag("untagget");
}
script=obj.GetComponent("window_control");
//2秒後にモーションを再生
Invoke("Motiontimer", 2);
}
function Motiontimer () {
if(script.open_switch==true){
animation.Play("motion_01");
// }
}
else{
animation.Play("motion_00");
}
}