Пример #1
0
 public GBColor(GBColor other)
 {
     setColorValueFromFloat(Alpha, other.A);
     setColorValueFromFloat(Red, other.R);
     setColorValueFromFloat(Green, other.G);
     setColorValueFromFloat(Blue, other.B);
 }
Пример #2
0
        public RenderNode(GBXMLContainer initData, RenderNode parent)
        {
            Initdata = (GBXMLContainer)initData.Clone();
            Parent = parent;
            name = InitData.Name;

            LoadPatterns();

            state = InitData["InitialState"].Text;
            position = GBXMLContainer.ReadPointF(InitData);
            color = new GBColor(InitData["Color"]);

            zOrder = NumberConverter.ParseFloat(Initdata["ZOrder", "0.0"].Text);
            GBXMLContainer ch = Initdata["Children"];
            foreach (GBXMLContainer container in ch.Children)
            {
                string type = container["Type"].Text;
                Type chType = Type.GetType("GameBox.Graphics.Nodes." + type);
                RenderNode newChild = (RenderNode)Activator.CreateInstance(chType, container, this);
                childrenNode.Add(newChild);
            }

            GBXMLContainer animXML = Initdata["Animators"];
            foreach (GBXMLContainer animator in animXML.Children)
            {
                GBXMLContainer animatorParsed = ProcessManager.ActiveProcess.patternObjects.ParsePattern(animator);
                animators.Add(new Animator(animatorParsed));
            }
        }
Пример #3
0
 public GBColor Multiply(GBColor second)
 {
     A *= second.A;
     R *= second.R;
     G *= second.G;
     B *= second.B;
     return this;
 }
Пример #4
0
 public static GBColor Multiply(GBColor first, GBColor second)
 {
     GBColor temp = new GBColor(first);
     temp.A *= second.A;
     temp.R *= second.R;
     temp.G *= second.G;
     temp.B *= second.B;
     return temp;
 }