コード例 #1
0
 public XMLcastlewall(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
     this.width = int.Parse(tree.Attribute("width"));
     this.height = int.Parse(tree.Attribute("height"));
 }
コード例 #2
0
 public XMLgrassledge(XMLTree tree)
 {
     this.x      = int.Parse(tree.Attribute("x"));
     this.y      = int.Parse(tree.Attribute("y"));
     this.width  = int.Parse(tree.Attribute("width"));
     this.height = int.Parse(tree.Attribute("height"));
 }
コード例 #3
0
        public XMLgoomba(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String c = tree.Attribute("count");

            this.count = c == null ? 1 : int.Parse(c);
        }
コード例 #4
0
 public XMLstaircase(XMLTree tree)
 {
     this.x      = int.Parse(tree.Attribute("x"));
     this.y      = int.Parse(tree.Attribute("y"));
     this.width  = int.Parse(tree.Attribute("width"));
     this.height = int.Parse(tree.Attribute("height"));
     this.left   = tree.Attribute("direction").Equals("left");
 }
コード例 #5
0
 public XMLmovingplatform(XMLTree tree)
 {
     this.x1    = int.Parse(tree.Attribute("x1"));
     this.y1    = int.Parse(tree.Attribute("y1"));
     this.x2    = int.Parse(tree.Attribute("x2"));
     this.y2    = int.Parse(tree.Attribute("y2"));
     this.width = int.Parse(tree.Attribute("width"));
 }
コード例 #6
0
        public XMLlakitu(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String s = tree.Attribute("stop");

            this.stop = s == null ? 10000 : int.Parse(s);
        }
コード例 #7
0
        public XMLgenerator(XMLTree tree)
        {
            this.xStart = int.Parse(tree.Attribute("xstart"));
            String e = tree.Attribute("xend");

            this.xEnd = e == null ? 10000 : int.Parse(e);
            this.type = tree.Attribute("type");
        }
コード例 #8
0
        public XMLhammerbro(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String a = tree.Attribute("action");

            this.action = a == null ? "stay" : a;
        }
コード例 #9
0
        public XMLcoin(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String w = tree.Attribute("width");
            String h = tree.Attribute("height");

            this.width  = w == null ? 1 : int.Parse(w);
            this.height = h == null ? 1 : int.Parse(h);
        }
コード例 #10
0
        public XMLfirebar(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String c = tree.Attribute("direction");

            this.ccw = c != null && c.Equals("counterclockwise");
            String s = tree.Attribute("size");

            this.size = s != null ? (s.Equals("small") ? 6 : 10) : 0;
        }
コード例 #11
0
        public XMLinfiniteplatform(XMLTree tree)
        {
            this.x         = int.Parse(tree.Attribute("x"));
            this.width     = int.Parse(tree.Attribute("width"));
            this.frequency = double.Parse(tree.Attribute("frequency"));
            String d = tree.Attribute("direction");

            this.up = d == null ? false : d.Equals("up");
            String s = tree.Attribute("showpath");

            this.showpath = s == null ? false : bool.Parse(s);
        }
コード例 #12
0
ファイル: XMLbowser.cs プロジェクト: mmcgaha/SuperMarioBros
        public XMLbowser(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String h = tree.Attribute("hammers");
            String f = tree.Attribute("fireballs");
            String t = tree.Attribute("trueform");

            this.hammers   = h == null ? false : bool.Parse(h);
            this.fireballs = f == null ? false : bool.Parse(f);
            this.trueform  = t == null ? "bowser" : t;
        }
コード例 #13
0
 public XMLloop(XMLTree tree)
 {
     checkpoints = new List <Tuple <int, int, int> >();
     for (int i = 0; i < tree.ChildCount(); i++)
     {
         XMLTree t = tree.Child(i);
         if (t.Name().Equals("finish"))
         {
             finish = new Tuple <int, int>(int.Parse(t.Attribute("x")), int.Parse(t.Attribute("setback")));
         }
         else
         {
             checkpoints.Add(new Tuple <int, int, int>(
                                 int.Parse(t.Attribute("x")),
                                 int.Parse(t.Attribute("y")),
                                 int.Parse(t.Attribute("height"))
                                 ));
         }
     }
 }
コード例 #14
0
 public XMLscaleplatforms(XMLTree tree)
 {
     this.x1    = int.Parse(tree.Attribute("x1"));
     this.y1    = int.Parse(tree.Attribute("y1"));
     this.x2    = int.Parse(tree.Attribute("x2"));
     this.y2    = int.Parse(tree.Attribute("y2"));
     this.y3    = int.Parse(tree.Attribute("y3"));
     this.width = int.Parse(tree.Attribute("width"));
 }
コード例 #15
0
ファイル: XMLpipe.cs プロジェクト: mmcgaha/SuperMarioBros
        public XMLpipe(XMLTree tree)
        {
            this.x      = int.Parse(tree.Attribute("x"));
            this.y      = int.Parse(tree.Attribute("y"));
            this.height = int.Parse(tree.Attribute("height"));
            String w = tree.Attribute("width");

            this.width = w == null ? 0 : int.Parse(w);
            this.name  = tree.Attribute("name");
            this.go    = tree.Attribute("goto");
            String s = tree.Attribute("showtop");

            this.showtop = s != null;
        }
コード例 #16
0
        public XMLhiddenblock(XMLTree tree)
        {
            this.x = int.Parse(tree.Attribute("x"));
            this.y = int.Parse(tree.Attribute("y"));
            String w = tree.Attribute("width");
            String h = tree.Attribute("height");

            this.width  = w == null ? 1 : int.Parse(w);
            this.height = h == null ? 1 : int.Parse(h);
            String c = tree.Attribute("contains");

            this.contains = c == null ? "coin" : c;
            this.go       = tree.Attribute("goto");
        }
コード例 #17
0
 public XMLwater(XMLTree tree)
 {
     this.x     = int.Parse(tree.Attribute("x"));
     this.y     = int.Parse(tree.Attribute("y"));
     this.width = int.Parse(tree.Attribute("width"));
 }
コード例 #18
0
 public XMLflagpole(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
 }
コード例 #19
0
        public String GetLevelProperty(String tag, String attr)
        {
            XMLTree property = currentSublevel.SomeChild("properties").SomeChild(tag);

            return(property == null ? null : property.Attribute(attr));
        }
コード例 #20
0
ファイル: XMLcastle.cs プロジェクト: mmcgaha/SuperMarioBros
 public XMLcastle(XMLTree tree)
 {
     this.x    = int.Parse(tree.Attribute("x"));
     this.y    = int.Parse(tree.Attribute("y"));
     this.size = tree.Attribute("size");
 }
コード例 #21
0
 public XMLtoad(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
 }
コード例 #22
0
 public XMLprincess(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
 }
コード例 #23
0
 public XMLbowserbridge(XMLTree tree)
 {
     this.x     = int.Parse(tree.Attribute("x"));
     this.y     = int.Parse(tree.Attribute("y"));
     this.width = int.Parse(tree.Attribute("width"));
 }
コード例 #24
0
 public XMLbillblaster(XMLTree tree)
 {
     this.x      = int.Parse(tree.Attribute("x"));
     this.y      = int.Parse(tree.Attribute("y"));
     this.height = int.Parse(tree.Attribute("height"));
 }
コード例 #25
0
 public XMLspringboard(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
 }
コード例 #26
0
 public XMLridingplatform(XMLTree tree)
 {
     this.x     = int.Parse(tree.Attribute("x"));
     this.y     = int.Parse(tree.Attribute("y"));
     this.width = int.Parse(tree.Attribute("width"));
 }
コード例 #27
0
 public XMLvine(XMLTree tree)
 {
     this.x      = int.Parse(tree.Attribute("x"));
     this.y      = int.Parse(tree.Attribute("y"));
     this.height = int.Parse(tree.Attribute("height"));
 }
コード例 #28
0
 public XMLbouncingkoopa(XMLTree tree)
 {
     this.x = int.Parse(tree.Attribute("x"));
     this.y = int.Parse(tree.Attribute("y"));
 }
コード例 #29
0
 public XMLpiranhaplant(XMLTree tree)
 {
     this.x     = int.Parse(tree.Attribute("x"));
     this.y     = int.Parse(tree.Attribute("y"));
     this.color = tree.Attribute("color");
 }