示例#1
0
        /// <summary>
        /// Sets the current blend color for the most recent stack item (this color is blended with all the blending colors before it)
        /// </summary>
        /// <param name="value"></param>
        public void Set_Blend(ReadOnlyColor value, bool FireChangedEvent = true)
        {
            // Remove old value from the top of the stack
            if (BlendingStack.Count > 0)
            {
                BlendingStack.Pop();
            }
            // Find the value we need to stack the incoming one ontop of (so we can combine them)
            Color clr = BlendingStack.FirstOrDefault();

            // Combine the incoming value with the one before it(if any) in the stack
            if (clr != null)
            {
                clr *= value;
            }
            else
            {
                clr = new Color(value);
            }

            BlendingStack.Push(clr);
            if (FireChangedEvent)
            {
                Stack_Changed?.Invoke();
            }
        }
示例#2
0
        public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo)
        {
            // TODO Add logistics into TransformationDefinition class.
            TransformationDefinition transformation = GetCurrentTransformation();

            if (transformation == null)
            {
                if (originalEyeColor.HasValue && player.eyeColor != originalEyeColor.Value)
                {
                    player.eyeColor = originalEyeColor.Value;
                }

                return;
            }

            if (transformation.Appearance.hair == null)
            {
                return;
            }

            ReadOnlyColor hairColor = transformation.Appearance.hair.hairColor;

            if (hairColor != null)
            {
                drawInfo.hairColor = hairColor;
            }

            if (transformation.Appearance.hair.hairShader.HasValue)
            {
                drawInfo.hairShader = 1;
            }

            if (transformation.Appearance.eyeColor != null)
            {
                ChangeEyeColor(transformation.Appearance.eyeColor.Value);
            }
        }
示例#3
0
 /// <summary>Create an RGBA color value</summary>
 public static CssValue From(ReadOnlyColor value) => new CssValue(ECssValueTypes.COLOR, value.AsInteger());
示例#4
0
 public Vertex2i(int X, int Y, ReadOnlyColor Color)
 {
     this.X     = X;
     this.Y     = Y;
     this.Color = Color;
 }
示例#5
0
 public SSJRTransformation(params TransformationDefinition[] parents) : base("Super Saiyan Rosé", TransformationDefinitionManager.roseTransformationTextColor,
                                                                             4.75f, 4.75f, 22, 2.75f, 310f / 60, 155f / 60, 0f,
                                                                             new TransformationAppearanceDefinition(AuraAnimations.ssjrAura, ReadOnlyColor.DefaultAuraLighting(Color.LightPink),
                                                                                                                    new HairAppearance("Hairs/SSJR/SSJRHair", null, null, HairAppearance.SSJ1_HAIRSTYLE_KEY), Color.LightPink),
                                                                             typeof(SSJRBuff),
                                                                             buffIconGetter: () => GFX.ssjrButtonImage, hasMenuIcon: true,
                                                                             canBeMastered: true,
                                                                             unlockRequirements: p => p.IsDivine(), parents: parents)
 {
 }