コード例 #1
0
 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();
         }
     }
 }
コード例 #2
0
        private void Update()
        {
            if (block != null)
            {
                //開始
                if (isStart)
                {
                    block.Start();
                    isStart = false;
                }

                //update
                block.Update();

                //終了
                if (block.IsEnd())
                {
                    //自身を破壊する
                    Destroy(this.gameObject);
                }
            }
        }