示例#1
0
 private void release()
 {
     if (editVolume != null)
     {
         if (this is Fixable)
         {
             editVolume.fixables.Remove(this as Fixable);
         }
         else if (this is Part)
         {
             editVolume.parts.Remove(this as Part);
         }
     }
     editVolume      = null;
     wasInEditVolume = false;
 }
示例#2
0
    void OnTriggerStay(Collider other)
    {
        ItemEditVolumeLabel currentEditVolume = other.GetComponent <ItemEditVolumeLabel>();

        if (currentEditVolume != null)
        {
            editVolume = currentEditVolume;
            if (!wasInEditVolume)
            {
                if (!pickedUp)
                {
                    stick();
                }
            }
            else if (pickedUp)
            {
                release();
            }
        }
        if (!inFloatVolume && other.GetComponent <floatVolume>() != null && !pickedUp)
        {
            getInFloatVolume();
        }
    }