■ このスレッドは過去ログ倉庫に格納されています
【3Dゲームエンジン】Unity質問スレッド11
- 316 :名前は開発中のものです。:2014/08/23(土) 14:05:08.02 ID:4AFhlQFQ.net
- 下記コードのwhile文の最初に
if(!spaceship.startShot)continue;
を書いたらフリーズするようになってしまったんですが原因分かりますでしょうか?
IEnumerator Start(){
//canShotがfalseの場合ここでコルーチンを終了する
if(spaceship.canShot == false)
yield break;
while(true)
{
if(!spaceship.startShot)continue;
//子要素を全て取得する
for(int i=0; i < transform.childCount; i++){
Transform shotposition = transform.GetChild(i);
//ShotPositionの位置、角度で撃つ
spaceship.Shot(shotposition);
}
//ShotDelay秒待つ
yield return new WaitForSeconds(spaceship.shotDelay);
}
}
総レス数 1007
310 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200