예제 #1
0
 internal Vector2DEasingParamater()
 {
     Start      = new Value.Vector2DWithRandom(0, 0);
     End        = new Value.Vector2DWithRandom(0, 0);
     StartSpeed = new Value.Enum <EasingStart>(EasingStart.Start);
     EndSpeed   = new Value.Enum <EasingEnd>(EasingEnd.End);
 }
예제 #2
0
        public static void LoadFromElement(XmlElement e, Value.Vector2DWithRandom value, bool isClip)
        {
            var e_x  = e["X"] as XmlElement;
            var e_y  = e["Y"] as XmlElement;
            var e_da = e["DrawnAs"];

            // Convert Vector2D into Vector2DWithRandom
            if (e_da == null &&
                e_x != null &&
                e_y != null &&
                e_x["Max"] == null &&
                e_y["Max"] == null)
            {
                var x = e_x.GetTextAsFloat();
                var y = e_y.GetTextAsFloat();
                value.X.SetCenter(x);
                value.Y.SetCenter(y);
            }
            else
            {
                if (e_x != null)
                {
                    LoadFromElement(e_x, value.X, isClip);
                }
                if (e_y != null)
                {
                    LoadFromElement(e_y, value.Y, isClip);
                }

                if (e_da != null)
                {
                    value.DrawnAs = (DrawnAs)e_da.GetTextAsInt();
                }
            }
        }
예제 #3
0
 public CustomDataParameter(int customDataNum)
 {
     this.customDataNum = customDataNum;
     CustomData         = new Value.Enum <CustomDataType>();
     Fixed       = new Value.Vector2D();
     Random      = new Value.Vector2DWithRandom();
     Easing      = new Vector2DEasingParamater();
     FCurve      = new Value.FCurveVector2D();
     Fixed4      = new Value.Vector4D();
     FCurveColor = new Value.FCurveColorRGBA();
 }
예제 #4
0
파일: IO.cs 프로젝트: saihe/Effekseer
        public static void LoadFromElement(XmlElement e, Value.Vector2DWithRandom value, bool isClip)
        {
            var e_x  = e["X"] as XmlElement;
            var e_y  = e["Y"] as XmlElement;
            var e_da = e["DrawnAs"];

            if (e_x != null)
            {
                LoadFromElement(e_x, value.X, isClip);
            }
            if (e_y != null)
            {
                LoadFromElement(e_y, value.Y, isClip);
            }

            if (e_da != null)
            {
                value.DrawnAs = (DrawnAs)e_da.GetTextAsInt();
            }
        }
예제 #5
0
        public static XmlElement SaveToElement(XmlDocument doc, string element_name, Value.Vector2DWithRandom value, bool isClip)
        {
            var e  = doc.CreateElement(element_name);
            var x  = SaveToElement(doc, "X", value.X, isClip);
            var y  = SaveToElement(doc, "Y", value.Y, isClip);
            var da = value.DefaultDrawnAs != value.DrawnAs ? doc.CreateTextElement("DrawnAs", (int)value.DrawnAs) : null;

            if (x != null)
            {
                e.AppendChild(x);
            }
            if (y != null)
            {
                e.AppendChild(y);
            }
            if (da != null)
            {
                e.AppendChild(da);
            }

            return(e.ChildNodes.Count > 0 ? e : null);
        }
예제 #6
0
 internal PVALocation(float x = 0.0f, float y = 0.0f)
 {
     Location     = new Value.Vector2DWithRandom(x, y);
     Velocity     = new Value.Vector2DWithRandom(0, 0);
     Acceleration = new Value.Vector2DWithRandom(0, 0);
 }
예제 #7
0
 public UVScrollParamater()
 {
     Start = new Value.Vector2DWithRandom();
     Size  = new Value.Vector2DWithRandom();
     Speed = new Value.Vector2DWithRandom();
 }
예제 #8
0
 internal PVALocation(float x = 0.0f, float y = 0.0f)
 {
     Location = new Value.Vector2DWithRandom(x, y);
     Velocity = new Value.Vector2DWithRandom(0, 0);
     Acceleration = new Value.Vector2DWithRandom(0, 0);
 }
예제 #9
0
 internal Vector2DEasingParamater()
 {
     Start = new Value.Vector2DWithRandom(0, 0);
     End = new Value.Vector2DWithRandom(0, 0);
     StartSpeed = new Value.Enum<EasingStart>(EasingStart.Start);
     EndSpeed = new Value.Enum<EasingEnd>(EasingEnd.End);
 }