コード例 #1
0
 public DecalChangedEvent(Texture2D newDecal, DCustomizationChannel channel, DCustomizerLayer decalLayer, Renderer chosenRenderer = null)
 {
     NewDecal       = newDecal;
     Channel        = channel;
     DecalLayer     = decalLayer;
     ChosenRenderer = chosenRenderer;
 }
コード例 #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;
            }
        }
コード例 #3
0
 public DecalTilingChangedEvent(bool isTiled, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     IsTiled    = isTiled;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
コード例 #4
0
 public DecalMovedEvent(Vector2 uvOffset, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     UVOffset   = uvOffset;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
コード例 #5
0
 public DecalTintChangedEvent(Color newColor, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     NewColor   = newColor;
     Channel    = channel;
     DecalLayer = decalLayer;
 }
コード例 #6
0
 public DecalRotatedEvent(float totalRotation, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     TotalRotation = totalRotation;
     Channel       = channel;
     DecalLayer    = decalLayer;
 }
コード例 #7
0
 public DecalScaledEvent(float newScale, DCustomizationChannel channel, DCustomizerLayer decalLayer)
 {
     NewScale   = newScale;
     Channel    = channel;
     DecalLayer = decalLayer;
 }