Exemple #1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.name == "LeftHit")
     {
         bc = other.transform.parent.gameObject.GetComponent <BoxController>();
         if (noNow[0] == bc.SetNo())//記憶した番号を削除
         {
             noNow[0]   = 0;
             boxSize[0] = 0;
             bcClone[0] = null;
         }
         else if (noNow[1] == bc.SetNo())
         {
             noNow[1]   = 0;
             boxSize[1] = 0;
             bcClone[1] = null;
         }
         else if (noNow[2] == bc.SetNo())
         {
             noNow[2]   = 0;
             boxSize[2] = 0;
             bcClone[2] = null;
         }
         else if (noNow[3] == bc.SetNo())
         {
             noNow[3]   = 0;
             boxSize[3] = 0;
             bcClone[3] = null;
         }
         else if (noNow[4] == bc.SetNo())
         {
             noNow[4]   = 0;
             boxSize[4] = 0;
             bcClone[4] = null;
         }
         else if (noNow[5] == bc.SetNo())
         {
             noNow[5]   = 0;
             boxSize[5] = 0;
             bcClone[5] = null;
         }
         else if (noNow[6] == bc.SetNo())
         {
             noNow[6]   = 0;
             boxSize[6] = 0;
             bcClone[6] = null;
         }
         else if (noNow[7] == bc.SetNo())
         {
             noNow[7]   = 0;
             boxSize[7] = 0;
             bcClone[7] = null;
         }
         bc.compFalse();
         //Debug.LogError("離れました:" + gameObject.name + ":" + bc.SetNo() + ":" + bc.SetBoxSize());
     }
 }