예제 #1
0
 private void LaunderTagBits()
 {
     if (dirtyTagBits)
     {
         tagBits.ClearAll();
         foreach (Tag tag in tags)
         {
             tagBits.SetTag(tag);
         }
         dirtyTagBits = false;
     }
 }
예제 #2
0
    private void UpdateStorageFetchableBits()
    {
        ChoreType storageFetch = Db.Get().ChoreTypes.StorageFetch;
        ChoreType foodFetch    = Db.Get().ChoreTypes.FoodFetch;

        storageFetchableBits.ClearAll();
        foreach (FetchChore fetchChore in fetchChores)
        {
            if ((fetchChore.choreType == storageFetch || fetchChore.choreType == foodFetch) && (bool)fetchChore.destination)
            {
                int cell = Grid.PosToCell(fetchChore.destination);
                if (MinionGroupProber.Get().IsReachable(cell, fetchChore.destination.GetOffsets(cell)))
                {
                    storageFetchableBits.Or(ref fetchChore.tagBits);
                }
            }
        }
    }