示例#1
0
 public void Clear()
 {
     isOccupied = false;
     idStored   = -1;
     if (boxLockedAt != null)
     {
         boxLockedAt.SetFree();
         boxLockedAt = null;
     }
 }
示例#2
0
    void BoxTouchedBeacon(PatternBox box, PatternBeacon beacon)
    {
        if (beacon == null) {
            box.SetFree ();
        } else {
            if(box.State == PatternBox.KState.LOCKED)
                box.beaconLockedAt.Clear();
            beacon.Clear();
            box.SetLock(beacon);
            beacon.Lock(box);

        }
    }
示例#3
0
 void BoxTouchedBeacon(PatternBox box, PatternBeacon beacon)
 {
     if (beacon == null)
     {
         box.SetFree();
     }
     else
     {
         if (box.State == PatternBox.KState.LOCKED)
         {
             box.beaconLockedAt.Clear();
         }
         beacon.Clear();
         box.SetLock(beacon);
         beacon.Lock(box);
     }
 }