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)); } }
public void AddType(GridCellContentsType type) { m_contentsMask = m_contentsMask | (1 << (int)type); m_contentTypeCounts[(int)type]++; }