コード例 #1
0
 protected override void OnTriggerEnter(Collider other)
 {
     if (breakObject != null)
     {
         if (!other.isTrigger)
         {
             if (other.tag == "Player" || other.tag == "Weighted")
             {
                 if (!weighted || PlayerInv.playerInv.weight > weight || other.tag == "Weighted")
                 {
                     if (changeCamera != null)
                     {
                         changeCamera.Activate();
                     }
                     if (explode)
                     {
                         breakObject.ExplodeThis(explodeSpeed);
                     }
                     else
                     {
                         breakObject.BreakThis();
                     }
                 }
             }
         }
     }
 }