Beispiel #1
0
        public void CreateFootholdDesignList()
        {
            GenerateFrames();

            IMGEntry entry = Image.GetChild("foothold");

            if (entry != null)
            {
                List <MapFootholdDesign> list = new List <MapFootholdDesign>();
                for (int i = 0; i < entry.childs.Count; i++)
                {
                    if (entry.childs[i].value == null)
                    {
                        List <MapFootholdDesign> l = new List <MapFootholdDesign>();
                        for (int j = 0; j < entry.childs[i].childs.Count; j++)
                        {
                            MapFootholdDesign fh = new MapFootholdDesign();
                            fh.Object = Object;
                            fh.Image  = entry.childs[i].childs[j];
                            l.Add(fh);
                        }
                        Footholds.Add(l);
                    }
                    else
                    {
                        MapFootholdDesign fh = new MapFootholdDesign();
                        fh.Object = Object;
                        fh.Image  = entry.childs[i];
                        list.Add(fh);
                    }
                }
                if (list.Count > 0)
                {
                    Footholds.Add(list);
                }
            }
            entry = Image.GetChild("ladder");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapLRDesign lr = new MapLRDesign(true);
                    lr.Object = Object;
                    lr.Image  = e;
                    LRs.Add(lr);
                }
            }
            entry = Image.GetChild("rope");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapLRDesign lr = new MapLRDesign(false);
                    lr.Object = Object;
                    lr.Image  = e;
                    LRs.Add(lr);
                }
            }
            entry = Image.GetChild("..").GetChild("seat");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapSeatDesign s = new MapSeatDesign();
                    s.Object = Object;
                    s.Image  = e;
                    Seats.Add(s);
                }
            }
        }
Beispiel #2
0
        public void CreateFootholdDesignList()
        {
            GenerateFrames();

            IMGEntry entry = Image.GetChild("foothold");
            if (entry != null)
            {
                List<MapFootholdDesign> list = new List<MapFootholdDesign>();
                for (int i = 0; i < entry.childs.Count; i++)
                {
                    if (entry.childs[i].value == null)
                    {
                        List<MapFootholdDesign> l = new List<MapFootholdDesign>();
                        for (int j = 0; j < entry.childs[i].childs.Count; j++)
                        {
                            MapFootholdDesign fh = new MapFootholdDesign();
                            fh.Object = Object;
                            fh.Image = entry.childs[i].childs[j];
                            l.Add(fh);
                        }
                        Footholds.Add(l);
                    }
                    else
                    {
                        MapFootholdDesign fh = new MapFootholdDesign();
                        fh.Object = Object;
                        fh.Image = entry.childs[i];
                        list.Add(fh);
                    }
                }
                if (list.Count > 0)
                {
                    Footholds.Add(list);
                }
            }
            entry = Image.GetChild("ladder");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapLRDesign lr = new MapLRDesign(true);
                    lr.Object = Object;
                    lr.Image = e;
                    LRs.Add(lr);
                }
            }
            entry = Image.GetChild("rope");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapLRDesign lr = new MapLRDesign(false);
                    lr.Object = Object;
                    lr.Image = e;
                    LRs.Add(lr);
                }
            }
            entry = Image.GetChild("..").GetChild("seat");
            if (entry != null)
            {
                foreach (IMGEntry e in entry.childs.Values)
                {
                    MapSeatDesign s = new MapSeatDesign();
                    s.Object = Object;
                    s.Image = e;
                    Seats.Add(s);
                }
            }
        }
Beispiel #3
0
        private void CreateSeat(MapSeatDesign seatd)
        {
            IMGEntry entry = new IMGEntry();
            entry.SetVector(new WZVector(seatd.GetX() - Map.Instance.CenterX, seatd.GetY() - Map.Instance.CenterY));

            MapSeat seat = new MapSeat();
            seat.Object = entry;

            Map.Instance.Add(seat);
        }