Beispiel #1
0
 public override LoadXML Export()
 {
     Cfg.Map.MapMonster data = new Cfg.Map.MapMonster();
     data.Id       = Id;
     data.Position = Position;
     data.Euler    = Euler;
     data.Talks    = Talks;
     data.Scale    = Scale;
     return(data);
 }
Beispiel #2
0
    public override void Import(LoadXML pData, bool pBuild)
    {
        Cfg.Map.MapMonster data = pData as Cfg.Map.MapMonster;
        Id       = data.Id;
        Position = data.Position;
        Euler    = data.Euler;
        Talks    = data.Talks;
        Scale    = data.Scale;
        GameObject go = new GameObject();

        go.transform.parent           = transform;
        go.transform.localPosition    = Vector3.zero;
        go.transform.localEulerAngles = Vector3.zero;
    }
Beispiel #3
0
        public override void Read(XmlNode os)
        {
            foreach (XmlNode current in LoadXML.GetChilds(os))
            {
                switch (current.Name)
                {
                case "Id":
                    this.Id = ReadInt(current);
                    break;

                case "A":
                    this.A = new MapBorn();
                    this.A.Read(current);
                    break;

                case "B":
                    this.B = new MapBorn();
                    this.B.Read(current);
                    break;

                case "C":
                    this.C = new MapBorn();
                    this.C.Read(current);
                    break;

                case "MonsterGroups":
                    LoadXML.GetChilds(current).ForEach(delegate(XmlNode pNode)
                    {
                        MapMonster data = new MapMonster();
                        data.Read(pNode);
                        this.Monsters.Add(data);
                    });
                    break;

                case "PlayerGroups":
                    LoadXML.GetChilds(current).ForEach(delegate(XmlNode pNode)
                    {
                        MapPlayer data = new MapPlayer();
                        data.Read(pNode);
                        this.Players.Add(data);
                    });
                    break;
                }
            }
        }