public void RemoveAndDestroyPattern(ObjectPlacementPathHeightPattern pathHeightPattern) { if (ContainsPattern(pathHeightPattern)) { _pathHeightPatterns.RemoveEntity(pathHeightPattern); ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage.SendToInterestedListeners(pathHeightPattern); UndoEx.DestroyObjectImmediate(pathHeightPattern); } }
public void RemoveAndDestroyAllPatterns() { List <ObjectPlacementPathHeightPattern> patterns = GetAllPatterns(); foreach (ObjectPlacementPathHeightPattern pattern in patterns) { _pathHeightPatterns.RemoveEntity(pattern); ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage.SendToInterestedListeners(pattern); } foreach (ObjectPlacementPathHeightPattern pattern in patterns) { UndoEx.DestroyObjectImmediate(pattern); } }
private void RespondToMessage(ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage message) { _manualConstructionSession.OnHeightPatternRemoved(); }
public static void SendToInterestedListeners(ObjectPlacementPathHeightPattern removedPattern) { var message = new ObjectPlacementPathHeightPatternWasRemovedFromDatabaseMessage(removedPattern); MessageListenerDatabase.Instance.SendMessageToInterestedListeners(message); }