public DecalChangedEvent(Texture2D newDecal, DCustomizationChannel channel, DCustomizerLayer decalLayer, Renderer chosenRenderer = null)
 {
     NewDecal       = newDecal;
     Channel        = channel;
     DecalLayer     = decalLayer;
     ChosenRenderer = chosenRenderer;
 }
Ejemplo n.º 2
0
        public DCustomizationChannel(ChannelMask channelColor)
        {
            customizationOptions = new Dictionary <CustomizationOption, bool>();
            customizationOptions[CustomizationOption.FABRIC] = false;
            customizationOptions[CustomizationOption.DECAL]  = false;
            channelName         = channelColor.ToString();
            channelMask         = channelColor;
            currentFabricState  = FabricState.NO_FABRIC;
            fabricLayer         = new DCustomizerLayer();
            fabricLayer.Type    = DecalType.FABRIC;
            fabricLayer.Scale   = DEFAULT_SCALE;
            fabricLayer.IsTiled = true;
            currentDecalState   = DecalState.NO_DECAL;
            decalLayer          = new DCustomizerLayer();
            decalLayer.Type     = DecalType.DECAL;
            decalLayer.Scale    = DEFAULT_SCALE_DECAL;
            decalLayer.IsTiled  = false;
            DecalRenderer       = null;
            switch (channelMask)
            {
            case ChannelMask.RED:
                fabricLayer.ShaderChannel = DecalColorChannel.RED_1;
                decalLayer.ShaderChannel  = DecalColorChannel.RED_4;
                break;

            case ChannelMask.GREEN:
                fabricLayer.ShaderChannel = DecalColorChannel.GREEN_2;
                decalLayer.ShaderChannel  = DecalColorChannel.GREEN_5;
                break;

            case ChannelMask.BLUE:
                fabricLayer.ShaderChannel = DecalColorChannel.BLUE_3;
                decalLayer.ShaderChannel  = DecalColorChannel.BLUE_6;
                break;
            }
        }
 public DecalTilingChangedEvent(bool isTiled, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     IsTiled    = isTiled;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
 public DecalMovedEvent(Vector2 uvOffset, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     UVOffset   = uvOffset;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
 public DecalTintChangedEvent(Color newColor, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     NewColor   = newColor;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
 public DecalRotatedEvent(float totalRotation, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     TotalRotation = totalRotation;
     Channel       = channel;
     DecalLayer    = decalLayer;
 }
 public DecalScaledEvent(float newScale, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     NewScale   = newScale;
     Channel    = channel;
     DecalLayer = decalLayer;
 }