Beispiel #1
0
    public void RemoveType(GridCellContentsType type)
    {
        m_contentTypeCounts[(int)type]--;

        if (m_contentTypeCounts[(int)type] < 0)
        {
            Debug.LogError("Invalid contents count!");
        }
        else if (m_contentTypeCounts[(int)type] == 0)
        {
            m_contentsMask = m_contentsMask & (~(1 << (int)type));
        }
    }
Beispiel #2
0
 public void AddType(GridCellContentsType type)
 {
     m_contentsMask = m_contentsMask | (1 << (int)type);
     m_contentTypeCounts[(int)type]++;
 }