public static void PerformRegistrationForNamedEntityCollectionWithMarker <T>(NamedEntityCollectionWithEntityMarker <T> entityCollection) where T : class, INamedEntity
        {
            if (entityCollection != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(entityCollection);

                listenerDatabase.RegisterListenerForMessage(MessageType.UndoRedoWasPerformed, entityCollection);
            }
        }
        public static void PerformRegistrationForPrefabCategoryDatabase(PrefabCategoryDatabase prefabCategoryDatabase)
        {
            if (prefabCategoryDatabase != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(prefabCategoryDatabase);

                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabTagWasRemovedFromDatabase, prefabCategoryDatabase);
            }
        }
        public static void PerformRegistrationForObjectPlacementPath(ObjectPlacementPath objectPlacementPath)
        {
            if (objectPlacementPath != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(objectPlacementPath);

                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathExcludeCornersWasChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathBorderSettingsWereChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathPaddingSettingsWereChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathRotateObjectsToFollowPathWasChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathHeightAdjustmentModeWasChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathAutomaticRandomHeightAdjustmentSettingsWereChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathAutomaticPatternHeightAdjustmentSettingsWereChanged, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementPathHeightPatternWasRemovedFromDatabase, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.NewObjectPlacementPathHeightPatternWasActivated, objectPlacementPath);
                listenerDatabase.RegisterListenerForMessage(MessageType.UndoRedoWasPerformed, objectPlacementPath);
            }
        }
示例#4
0
        public static void PerformRegistrationForObjectPlacementModule(ObjectPlacement objectPlacement)
        {
            if (objectPlacement != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(objectPlacement);

                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementModeWasChanged, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.UndoRedoWasPerformed, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.InspectorGUIWasChanged, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabWasRemovedFromCategory, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabCategoryWasRemovedFromDatabase, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectHierarchyRootsWerePlacedInScene, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementGuideWasInstantiated, objectPlacement);
                listenerDatabase.RegisterListenerForMessage(MessageType.ToolWasReset, objectPlacement);
            }
        }
示例#5
0
        public static void PerformRegistrationForObjectPlacementBlock(ObjectPlacementBlock objectPlacementBlock)
        {
            if (objectPlacementBlock != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(objectPlacementBlock);

                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementBlockExcludeCornersWasChanged, objectPlacementBlock);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementBlockPaddingSettingsWereChanged, objectPlacementBlock);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementBlockAutomaticRandomHeightAdjustmentSettingsWereChanged, objectPlacementBlock);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementBlockHeightAdjustmentModeWasChanged, objectPlacementBlock);
                listenerDatabase.RegisterListenerForMessage(MessageType.ObjectPlacementBlockSubdivisionSettingsWereChanged, objectPlacementBlock);
                listenerDatabase.RegisterListenerForMessage(MessageType.UndoRedoWasPerformed, objectPlacementBlock);
            }
        }