Example #1
0
 public override void ToScript()
 {
     Sw = new ScriptWriter(this);
     Sw.InitObject();
     base.ToScript();
     Sw.EndObject();
 }
Example #2
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);

            Sw.InitObject();

            base.ToScript();

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

            Sw.EndObject();
        }
Example #3
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);

            Sw.InitObject();

            base.ToScript();

            foreach (String tileType in TileTypes)
                Sw.WriteMethod("AddTileType", new String[] { ScriptWriter.GetStringOf(tileType) });

            Sw.EndObject();
        }
Example #4
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();
        }
Example #5
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();
 }
Example #6
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);

            Sw.InitObject();

            base.ToScript();

            Sw.WriteMethod("SetBase", new string[]
            {
                "Create:Texture(" + ScriptWriter.GetStringOf(BaseTexture.Type) + ")",
                Width.ToString(),
                Height.ToString(),
                Highness.ToString()
            });

            Sw.EndObject();
        }
Example #7
0
        public override void ToScript()
        {
            Sw = new ScriptWriter(this);

            Sw.InitObject();

            base.ToScript();

            Sw.WriteMethod("Init", new String[]
            {
                Width.ToString(),
                Height.ToString()
            });

            for (Int32 y = 0; y < Height; y++)
                for (Int32 x = 0; x < Width; x++)
                    if (GetBlock(x, y))
                        Sw.WriteMethod("AddBlock", new String[]
                        {
                            x.ToString(),
                            y.ToString()
                        });

            Sw.EndObject();

            ScriptWriter.WriteToFile("Ground/Ground_" + Type, GetTileSetStr());
        }