Пример #1
0
        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);
            }
        }
Пример #2
0
        public static void PerformRegistrationForPrefabCategoryDatabase(PrefabCategoryDatabase prefabCategoryDatabase)
        {
            if (prefabCategoryDatabase != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(prefabCategoryDatabase);

                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabTagWasRemovedFromDatabase, prefabCategoryDatabase);
            }
        }
Пример #3
0
        public static void PerformRegistrationForOctave3DScene(Octave3DScene octave3DScene)
        {
            if (octave3DScene != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(octave3DScene);

                listenerDatabase.RegisterListenerForMessage(MessageType.ToolWasReset, octave3DScene);
                listenerDatabase.RegisterListenerForMessage(MessageType.ToolWasSelected, octave3DScene);
            }
        }
        public static void PerformRegistrationForInspector(Inspector inspector)
        {
            if (inspector != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(inspector);

                listenerDatabase.RegisterListenerForMessage(MessageType.ToolWasReset, inspector);
                listenerDatabase.RegisterListenerForMessage(MessageType.ToolWasStarted, inspector);
            }
        }
Пример #5
0
        public static void PerformRegistrationForPrefabManagementWindow(PrefabManagementWindow prefabManagementWindow)
        {
            if (prefabManagementWindow != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(prefabManagementWindow);

                listenerDatabase.RegisterListenerForMessage(MessageType.NewPrefabWasActivated, prefabManagementWindow);
                listenerDatabase.RegisterListenerForMessage(MessageType.NewPrefabCategoryWasActivated, prefabManagementWindow);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabTagActiveStateWasChanged, prefabManagementWindow);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabTagWasCreatedInDatabase, prefabManagementWindow);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabTagWasRemovedFromDatabase, prefabManagementWindow);
            }
        }
Пример #6
0
        public static void PerformRegistrationForObjectPlacementGuide(ObjectPlacementGuide objectPlacementGuide)
        {
            if (objectPlacementGuide != null)
            {
                MessageListenerDatabase listenerDatabase = MessageListenerDatabase.Instance;
                listenerDatabase.UnregisterListener(objectPlacementGuide);

                listenerDatabase.RegisterListenerForMessage(MessageType.NewPrefabWasActivated, objectPlacementGuide);
                listenerDatabase.RegisterListenerForMessage(MessageType.NewPrefabCategoryWasActivated, objectPlacementGuide);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabWasRemovedFromCategory, objectPlacementGuide);
                listenerDatabase.RegisterListenerForMessage(MessageType.PrefabCategoryWasRemovedFromDatabase, objectPlacementGuide);
                listenerDatabase.RegisterListenerForMessage(MessageType.UndoRedoWasPerformed, objectPlacementGuide);
            }
        }
Пример #7
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);
            }
        }
Пример #8
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);
            }
        }
Пример #9
0
        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);
            }
        }