예제 #1
0
 protected override void ReadData(XleSerializationInfo info)
 {
     MapID            = info.ReadInt32("MapID");
     mAsk             = info.ReadBoolean("AskUser");
     TargetEntryPoint = info.ReadInt32("TargetEntryPoint");
     mCommandText     = info.ReadString("CommandText", "");
 }
예제 #2
0
        protected override void ReadData(XleSerializationInfo info)
        {
            mWidth  = info.ReadInt32("Width");
            mHeight = info.ReadInt32("Height");

            mData = info.ReadInt32Array("MapData");
        }
예제 #3
0
 public override Size Deserialize(XleSerializationInfo info)
 {
     return(new Size()
     {
         Width = info.ReadInt32("Width"),
         Height = info.ReadInt32("Height"),
     });
 }
예제 #4
0
 void IXleSerializable.ReadData(XleSerializationInfo info)
 {
     mRect.X      = info.ReadInt32("X");
     mRect.Y      = info.ReadInt32("Y");
     mRect.Width  = info.ReadInt32("Width");
     mRect.Height = info.ReadInt32("Height");
     mData        = info.ReadInt32Array("RoofData");
 }
예제 #5
0
        protected override void ReadData(XleSerializationInfo info)
        {
            base.ReadData(info);

            mBuyRaftMap  = info.ReadInt32("BuyRaftMap", 0);
            mBuyRaftPt.X = info.ReadInt32("BuyRaftX", 0);
            mBuyRaftPt.Y = info.ReadInt32("BuyRaftY", 0);
        }
예제 #6
0
 public override Point Deserialize(XleSerializationInfo info)
 {
     return(new Point()
     {
         X = info.ReadInt32("X"),
         Y = info.ReadInt32("Y"),
     });
 }
예제 #7
0
 public override Rectangle Deserialize(XleSerializationInfo info)
 {
     return(new Rectangle(
                info.ReadInt32("X"),
                info.ReadInt32("Y"),
                info.ReadInt32("Width"),
                info.ReadInt32("Height")));
 }
예제 #8
0
 void IXleSerializable.ReadData(XleSerializationInfo info)
 {
     Tiles         = info.ReadList <int>("Tiles");
     AnimationType = info.ReadEnum <AnimationType>("AnimationType", Maps.AnimationType.Random);
     AnimationTime = info.ReadInt32("AnimationTime", 50);
     GroupType     = info.ReadEnum <GroupType>("GroupType", Maps.GroupType.None);
     AnimateChance = info.ReadInt32("AnimateChance", 100);
 }
예제 #9
0
        void IXleSerializable.ReadData(XleSerializationInfo info)
        {
            mGuards        = info.ReadList <Guard>("Guards");
            DefaultAttack  = info.ReadInt32("GuardDefaultAttack");
            DefaultColor   = ColorX.FromArgb(info.ReadInt32("GuardDefaultColor").ToString("X8"));
            DefaultDefense = info.ReadInt32("GuardDefaultDefense");
            DefaultHP      = info.ReadInt32("GuardDefaultHP");

            InitializeGuardData();
        }
예제 #10
0
        void IXleSerializable.ReadData(XleSerializationInfo info)
        {
            rect.X       = info.ReadInt32("X");
            rect.Y       = info.ReadInt32("Y");
            rect.Width   = info.ReadInt32("Width");
            rect.Height  = info.ReadInt32("Height");
            ExtenderName = info.ReadString("ExtenderName", "");

            ReadData(info);

            AfterReadData();
        }
예제 #11
0
        void IXleSerializable.ReadData(XleSerializationInfo info)
        {
            mMapName = info.ReadString("MapName");
            mMapID   = info.ReadInt32("MapID");

            ExtenderName = info.ReadString("ExtenderName", "");

            if (info.ContainsKey("EntryPoints"))
            {
                EntryPoints = info.ReadList <EntryPoint>("EntryPoints");
            }
            if (info.ContainsKey("Tileset"))
            {
                mTileImage = info.ReadString("Tileset");
            }
            else
            {
                mTileImage = info.ReadString("TileImage");
                mTileSet   = info.ReadObject <TileSet>("TileSet");
            }

            var defaultTile = info.ReadInt32("DefaultTile", 0);

            mOutsideTile = info.ReadInt32("OutsideTile", 0);

            if (mOutsideTile == 0)
            {
                mOutsideTile = defaultTile;
            }

            mEvents.AddRange(info.ReadArray <XleEvent>("Events"));

            if (info.ContainsKey("Roofs"))
            {
                Roofs = info.ReadList <Roof>("Roofs");
            }
            if (info.ContainsKey("Guards"))
            {
                Guards = info.ReadObject <GuardList>("Guards");
            }

            // read events
            ReadData(info);

            SetChestIDs();
        }
예제 #12
0
        void IXleSerializable.ReadData(XleSerializationInfo info)
        {
            X     = info.ReadInt32("X");
            Y     = info.ReadInt32("Y");
            Color = ColorX.FromArgb(info.ReadInt32("Color").ToString("X8"));

            HP      = info.ReadInt32("HP");
            Attack  = info.ReadInt32("Attack");
            Defense = info.ReadInt32("Defense");
        }
예제 #13
0
파일: Dungeon.cs 프로젝트: eylvisaker/Xle
 protected override void ReadData(XleSerializationInfo info)
 {
     mWidth             = info.ReadInt32("Width");
     mHeight            = info.ReadInt32("Height");
     mLevels            = info.ReadInt32("Levels");
     mData              = info.ReadArray <int>("Data");
     MaxMonsters        = info.ReadInt32("MaxMonsters");
     MonsterHealthScale = info.ReadInt32("MonsterHealthScale");
     MonsterDamageScale = info.ReadInt32("MonsterDamageScale");
 }
예제 #14
0
 void IXleSerializable.ReadData(XleSerializationInfo info)
 {
     Facing       = info.ReadEnum <Direction>("Facing");
     Location     = info.ReadObject <Point>("Location");
     DungeonLevel = info.ReadInt32("DungeonLevel");
 }
예제 #15
0
파일: Door.cs 프로젝트: eylvisaker/Xle
 protected override void ReadData(XleSerializationInfo info)
 {
     RequiredItem    = info.ReadInt32("RequiredItem", 0);
     ReplacementTile = info.ReadInt32("ReplacementTile", 0);
 }
예제 #16
0
파일: MapData.cs 프로젝트: eylvisaker/Xle
 void IXleSerializable.ReadData(XleSerializationInfo info)
 {
     mWidth  = info.ReadInt32("Width");
     mHeight = info.ReadInt32("Height");
     mData   = info.ReadInt32Array("Data");
 }
예제 #17
0
 protected override void ReadData(XleSerializationInfo info)
 {
     mContainsItem = info.ReadBoolean("ContainsItem", false);
     mContents     = info.ReadInt32("Contents", 0);
 }
예제 #18
0
        void IXleSerializable.ReadData(XleSerializationInfo info)
        {
            Cheater = info.ReadBoolean("Cheater", false);

            mAttributes = (AttributeContainer)info.ReadObject("Attributes");
            food        = info.ReadDouble("Food");
            gold        = info.ReadInt32("Gold");
            goldBank    = info.ReadInt32("GoldInBank");
            timedays    = info.ReadDouble("TimeDays");
            timequality = info.ReadDouble("TimeQuality");

            onRaft = info.ReadInt32("OnRaft");
            rafts  = info.ReadList <RaftData>("Rafts");

            gamespeed     = info.ReadInt32("GameSpeed");
            map           = info.ReadInt32("Map");
            lastMap       = info.ReadInt32("LastMap");
            dungeon       = info.ReadInt32("Dungeon");
            hp            = info.ReadInt32("HP");
            level         = info.ReadInt32("Level");
            returnMap     = info.ReadInt32("ReturnMap");
            returnX       = info.ReadInt32("ReturnX");
            returnY       = info.ReadInt32("ReturnY");
            returnFacing  = info.ReadEnum <Direction>("ReturnFacing");
            x             = info.ReadInt32("X");
            y             = info.ReadInt32("Y");
            dungeonLevel  = info.ReadInt32("DungeonLevel");
            faceDirection = (Direction)info.ReadInt32("Facing");

            weapons = info.ReadList <WeaponItem>("Weapons");
            armor   = info.ReadList <ArmorItem>("Armor");

            currentArmorIndex  = info.ReadInt32("CurrentArmorIndex");
            currentWeaponIndex = info.ReadInt32("CurrentWeaponIndex");

            mItems = info.ReadObject <ItemContainer>("Item");
            hold   = info.ReadInt32("Hold");

            lastAttacked = info.ReadInt32("LastAttacked");
            VaultGold    = info.ReadInt32("VaultGold");

            chests = info.ReadArray <int>("Chests");

            loan    = info.ReadInt32("Loan");               // loan amount
            dueDate = info.ReadInt32("DueDate");            // time in days that the money is due

            mailTown = info.ReadInt32("MailTown");

            mName = info.ReadString("Name");

            StoryData = info.ReadObject <IXleSerializable>("StoryData");

            RenderColor = XleColor.White;
        }
예제 #19
0
 public void ReadData(XleSerializationInfo info)
 {
     ID      = info.ReadInt32("ID");
     Quality = info.ReadInt32("Quality");
 }
예제 #20
0
 void IXleSerializable.ReadData(XleSerializationInfo info)
 {
     MapNumber  = info.ReadInt32("MapID");
     Location.X = info.ReadInt32("X");
     Location.Y = info.ReadInt32("Y");
 }