public Piece PrepareChanges(Position position, SideChange[] sideChanges) { _preparedPosition = position; foreach (var orientationChange in sideChanges) { ColorTags.FirstOrDefault(c => c.CubeSide == orientationChange.From)?.PrepareChange(orientationChange.To); } _changesPrepared = true; return(this); }
public void OnValidate() { if (m_tagGenerator != null) { foreach (var color in m_tagGenerator.m_tagsList.m_tags) { m_tagToImage.Add(new TagToImage() { m_tag = color.m_tag }); } m_tagGenerator = null; } }