public sealed override void Update() { if (index == 0) { if (init.IsEnd()) { ok.Start(); not.Start(); index += 1; } else { init.Update(); } } if (index == 1) { if (ok.IsEnd()) { //終了させる this.SetEnd(); } else if (not.IsEnd()) { //再起動させる this.Start(); } else { ok.Update(); not.Update(); } } }
private void Update() { if (block != null) { //開始 if (isStart) { block.Start(); isStart = false; } //update block.Update(); //終了 if (block.IsEnd()) { //自身を破壊する Destroy(this.gameObject); } } }