Matt02's Note

仕事関係。Android、Unity、cocos2d-xに関してのメモを書いていきます。

【Unity】指定秒ごとに処理を実行

 //1秒おきに処理を実行

void Update(){

    intervalTime += Time.deltaTime;
    if(intervalTime >= 1.0f) {
        Hoge ();
        intervalTime = 0.0f;

        if(isHoge){
            Guage.value = (int)ComparerTime()/1000f;
            Guage.ForceUpdate();
        }
    }
}