public GBColor(GBColor other) { setColorValueFromFloat(Alpha, other.A); setColorValueFromFloat(Red, other.R); setColorValueFromFloat(Green, other.G); setColorValueFromFloat(Blue, other.B); }
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)); } }
public GBColor Multiply(GBColor second) { A *= second.A; R *= second.R; G *= second.G; B *= second.B; return this; }
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; }