/// <summary>
        /// The ReordableList remove button has been pressed. Remove the selected state.
        /// </summary>
        private void OnAnimatorAudioStateSetStateListRemove(ReorderableList list)
        {
            var animatorAudioState = m_ShootableWeapon.ReloadAnimatorAudioStateSet.States[EditorPrefs.GetInt(SelectedReloadAnimatorAudioStateSetIndexKey)];
            var states             = StateInspector.OnStateListRemove(animatorAudioState.States, GetSelectedAnimatorAudioStateSetStateIndexKey(EditorPrefs.GetInt(SelectedReloadAnimatorAudioStateSetIndexKey)), list);

            if (animatorAudioState.States.Length != states.Length)
            {
                InspectorUtility.SynchronizePropertyCount(states, m_ReorderableReloadAnimatorAudioStateSetStateList.serializedProperty);
                Shared.Editor.Utility.EditorUtility.RecordUndoDirtyObject(target, "Change Value");
                animatorAudioState.States = states;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The ReordableList remove button has been pressed. Remove the selected state.
        /// </summary>
        private void OnPickupSetStateListRemove(ReorderableList list)
        {
            var pickupSet = m_ItemPickup.ItemPickupSet[EditorPrefs.GetInt(SelectedPickupSetIndexKey, -1)];
            var states    = StateInspector.OnStateListRemove(pickupSet.ItemSet.States, GetSelectedPickupSetStateIndexKey(EditorPrefs.GetInt(SelectedPickupSetIndexKey, -1)), list);

            if (pickupSet.ItemSet.States.Length != states.Length)
            {
                InspectorUtility.SynchronizePropertyCount(states, m_ReorderablePickupSetStateList.serializedProperty);
                InspectorUtility.RecordUndoDirtyObject(target, "Change Value");
                pickupSet.ItemSet.States = states;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// The ReordableList remove button has been pressed. Remove the selected state.
        /// </summary>
        private void OnAttributeStateListRemove(ReorderableList list)
        {
            var attribute = m_AttributeManager.Attributes[EditorPrefs.GetInt(SelectedAttributeIndexKey)];
            var states    = StateInspector.OnStateListRemove(attribute.States, GetSelectedAttributeStateIndexKey(attribute), list);

            if (attribute.States.Length != states.Length)
            {
                InspectorUtility.SynchronizePropertyCount(states, m_ReorderableAttributeStateList.serializedProperty);
                InspectorUtility.RecordUndoDirtyObject(target, "Change Value");
                attribute.States = states;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// The ReordableList remove button has been pressed. Remove the selected state.
        /// </summary>
        private void OnViewTypeStateListRemove(ReorderableList list)
        {
            var viewType = m_CameraController.ViewTypes[EditorPrefs.GetInt(SelectedViewTypeIndexKey)];
            var states   = StateInspector.OnStateListRemove(viewType.States, GetSelectedViewTypeStateIndexKey(viewType), list);

            if (viewType.States.Length != states.Length)
            {
                InspectorUtility.SynchronizePropertyCount(states, m_ReorderableViewTypeStateList.serializedProperty);
                Shared.Editor.Utility.EditorUtility.RecordUndoDirtyObject(target, "Change Value");
                viewType.States = states;
                SerializeViewTypes();
            }
        }
        /// <summary>
        /// The ReordableList remove button has been pressed. Remove the selected state.
        /// </summary>
        private void OnItemSetStateListRemove(ReorderableList list)
        {
            m_ItemSetListIndex = m_ReorderableListCategoryMap[list];
            var itemSet = m_ItemSetManager.CategoryItemSets[m_ItemSetListIndex].ItemSetList[EditorPrefs.GetInt(SelectedItemSetIndexKey, -1)];
            var states  = StateInspector.OnStateListRemove(itemSet.States, GetSelectedItemSetStateIndexKey(EditorPrefs.GetInt(SelectedItemSetIndexKey, -1)), list);

            if (itemSet.States.Length != states.Length)
            {
                InspectorUtility.SynchronizePropertyCount(states, m_ReorderableItemSetStateList[m_ItemSetListIndex].serializedProperty);
                Shared.Editor.Utility.EditorUtility.RecordUndoDirtyObject(target, "Change Value");
                itemSet.States = states;
            }
        }