Пример #1
0
        public OverlayEditor(UMAData.UMARecipe recipe, SlotData slotData, OverlayData overlayData)
        {
            _recipe      = recipe;
            _overlayData = overlayData;
            _slotData    = slotData;

            _sharedColors = false;
            if (_recipe.sharedColors != null)
            {
                foreach (OverlayColorData ocd in _recipe.sharedColors)
                {
                    if (ocd.GetHashCode() == _overlayData.colorData.GetHashCode())
                    {
                        _sharedColors = true;
                    }
                }
            }
            if (_sharedColors && (_overlayData.colorData.name == OverlayColorData.UNSHARED))
            {
                _sharedColors = false;
            }

            _textures = new TextureEditor[overlayData.asset.textureList.Length];
            for (int i = 0; i < overlayData.asset.textureList.Length; i++)
            {
                _textures[i] = new TextureEditor(overlayData.asset.textureList[i]);
            }

            BuildColorEditors();
        }
Пример #2
0
        public OverlayEditor(SlotData slotData, OverlayData overlayData)
        {
            _overlayData = overlayData;
            _slotData    = slotData;

            _textures = new TextureEditor[overlayData.textureList.Length];
            for (int i = 0; i < overlayData.textureList.Length; i++)
            {
                _textures[i] = new TextureEditor(overlayData.textureList[i]);
            }

            BuildColorEditors();
        }
Пример #3
0
        public OverlayEditor(UMAData.UMARecipe recipe, SlotData slotData, OverlayData overlayData)
        {
            _recipe      = recipe;
            _overlayData = overlayData;
            _slotData    = slotData;

            _sharedColors = false;
            if (_recipe.sharedColors != null)
            {
                _sharedColors = ArrayUtility.Contains <OverlayColorData>(_recipe.sharedColors, _overlayData.colorData);
            }
            if (_sharedColors && (_overlayData.colorData.name == OverlayColorData.UNSHARED))
            {
                _sharedColors = false;
            }

            _textures = new TextureEditor[overlayData.asset.textureList.Length];
            for (int i = 0; i < overlayData.asset.textureList.Length; i++)
            {
                _textures[i] = new TextureEditor(overlayData.asset.textureList[i]);
            }

            BuildColorEditors();
        }