Пример #1
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);

            Sw.InitObject();

            base.ToScript();

            Sw.WriteProperty("Texture", "Create:Texture(\"" + Texture.Type + "\")");

            Sw.EndObject();
        }
Пример #2
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);
            Sw.InitObject();
            base.ToScript();

            Sw.WriteProperty("BasePoint", "Vector2f(" + BasePoint.X.ToString() + ", " + BasePoint.Y.ToString() + ")");
            Sw.WriteProperty("ComparisonPointYType", "ComparisonPointYType." + ComparisonPointYType.ToString());

            Sw.WriteProperty("StopFrame", StopFrame.ToString());
            Sw.WriteProperty("FrameRate", FrameRate.ToString());

            foreach (Texture frame in Frames)
                Sw.WriteMethod("AddFrame", new string[] { "Create:Texture(" + ScriptWriter.GetStringOf(frame.Type) + ")" });

            Sw.EndObject();
        }
Пример #3
0
 public void ToScript()
 {
     Sw = new ScriptWriter(this);
     Sw.InitObject();
     Sw.WriteProperty("ImagePath", "\"" + ImagePath + "\"");
     if (ImageSubRect != null)
     {
         Sw.WriteProperty("ImageSubRect", "IntRect(" + ImageSubRect.Left + ", " +
                                                            ImageSubRect.Top + ", " +
                                                            ImageSubRect.Right + ", " +
                                                            ImageSubRect.Bottom + ")");
     }
     Sw.EndObject();
 }