Пример #1
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (Sword.CharacterVO)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "Name":
                    instance.Name = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "Level":
                    instance.Level = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "Class":
                    instance.Class = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "Race":
                    instance.Race = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.Rigidbody)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "velocity":
                    instance.velocity = reader.Read <UnityEngine.Vector3>(ES3Type_Vector3.Instance);
                    break;

                case "isKinematic":
                    instance.isKinematic = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                case "constraints":
                    instance.constraints = reader.Read <UnityEngine.RigidbodyConstraints>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #3
0
        public override void ReadInto <T>(ES3Reader reader, object obj)
        {
            var    instance = (UnityEngine.ParticleSystem.ColorBySpeedModule)obj;
            string propertyName;

            while ((propertyName = reader.ReadPropertyName()) != null)
            {
                switch (propertyName)
                {
                case "enabled":
                    instance.enabled = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                case "color":
                    instance.color = reader.Read <UnityEngine.ParticleSystem.MinMaxGradient>(ES3Type_MinMaxGradient.Instance);
                    break;

                case "range":
                    instance.range = reader.Read <UnityEngine.Vector2>(ES3Type_Vector2.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        public override void ReadInto <T>(ES3Reader reader, object obj)
        {
            var    instance = (UnityEngine.AnimationCurve)obj;
            string propertyName;

            while ((propertyName = reader.ReadPropertyName()) != null)
            {
                switch (propertyName)
                {
                case "keys":
                    instance.keys = reader.Read <UnityEngine.Keyframe[]>();
                    break;

                case "preWrapMode":
                    instance.preWrapMode = reader.Read <UnityEngine.WrapMode>();
                    break;

                case "postWrapMode":
                    instance.postWrapMode = reader.Read <UnityEngine.WrapMode>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #5
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (Transform)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "parent":
                    instance.SetParent(reader.Read <Transform>());
                    break;

                case "localPosition":
                    instance.localPosition = reader.Read <Vector3>();
                    break;

                case "localRotation":
                    instance.localRotation = reader.Read <Quaternion>();
                    break;

                case "localScale":
                    instance.localScale = reader.Read <Vector3>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #6
0
        public override void ReadInto <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.Gradient)obj;

            instance.SetKeys(
                reader.ReadProperty <UnityEngine.GradientColorKey[]>(ES3Type_GradientColorKeyArray.Instance),
                reader.ReadProperty <UnityEngine.GradientAlphaKey[]>(ES3Type_GradientAlphaKeyArray.Instance)
                );

            string propertyName;

            while ((propertyName = reader.ReadPropertyName()) != null)
            {
                switch (propertyName)
                {
                case "mode":
                    instance.mode = reader.Read <UnityEngine.GradientMode>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (DialogPanel)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "dialogText":
                    reader.SetPrivateField("dialogText", reader.Read <UnityEngine.UI.Text>(), instance);
                    break;

                case "dialogPanel":
                    reader.SetPrivateField("dialogPanel", reader.Read <UnityEngine.GameObject>(), instance);
                    break;

                case "dialog":
                    reader.SetPrivateField("dialog", reader.Read <System.String[]>(), instance);
                    break;

                case "dialogIndex":
                    reader.SetPrivateField("dialogIndex", reader.Read <System.Int32>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #8
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (Devdog.QuestSystemPro.QuestSerializationModel)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "ID":
                    instance.ID = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "repeatedTimes":
                    instance.repeatedTimes = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "status":
                    instance.status = reader.Read <Devdog.QuestSystemPro.QuestStatus>();
                    break;

                case "tasks":
                    instance.tasks = reader.Read <Devdog.QuestSystemPro.TaskSerializationModel[]>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #9
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.PhysicMaterial)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "dynamicFriction":
                    instance.dynamicFriction = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                case "staticFriction":
                    instance.staticFriction = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                case "bounciness":
                    instance.bounciness = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                case "frictionCombine":
                    instance.frictionCombine = reader.Read <UnityEngine.PhysicMaterialCombine>();
                    break;

                case "bounceCombine":
                    instance.bounceCombine = reader.Read <UnityEngine.PhysicMaterialCombine>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #10
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (HK.AutoAnt.UserControllers.GameHistory)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "Time":
                    instance.Time = reader.Read <System.Double>(ES3Type_double.Instance);
                    break;

                case "LastDateTime":
                    instance.LastDateTime = reader.Read <System.DateTime>(ES3Type_DateTime.Instance);
                    break;

                case "GameLeftCase":
                    instance.GameLeftCase = reader.Read <HK.AutoAnt.Constants.GameLeftCase>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (Character)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "body":
                    reader.SetPrivateField("body", reader.Read <UnityEngine.Rigidbody2D>(), instance);
                    break;

                case "movementSpeed":
                    reader.SetPrivateField("movementSpeed", reader.Read <System.Single>(), instance);
                    break;

                case "sprite":
                    reader.SetPrivateField("sprite", reader.Read <UnityEngine.SpriteRenderer>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadScriptableObject <T>(ES3Reader reader, object obj)
        {
            var instance = (LevelSaveData)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "Level_ID":
                    instance.Level_ID = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "topScore":
                    reader.SetPrivateField("topScore", reader.Read <System.Int32>(), instance);
                    break;

                case "topTime":
                    reader.SetPrivateField("topTime", reader.Read <System.Single>(), instance);
                    break;

                case "goalChecks":
                    reader.SetPrivateField("goalChecks", reader.Read <System.Boolean[]>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #13
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (Player)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "body":
                    reader.SetPrivateField("body", reader.Read <UnityEngine.Rigidbody2D>(), instance);
                    break;

                case "sprite":
                    reader.SetPrivateField("sprite", reader.Read <UnityEngine.SpriteRenderer>(), instance);
                    break;

                case "colliding":
                    reader.SetPrivateField("colliding", reader.Read <System.Boolean>(), instance);
                    break;

                case "animator":
                    reader.SetPrivateField("animator", reader.Read <UnityEngine.Animator>(), instance);
                    break;

                case "IsMoving":
                    instance.IsMoving = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (Devdog.QuestSystemPro.QuestsContainerSerializationModel)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "activeQuests":
                    instance.activeQuests = reader.Read <Devdog.QuestSystemPro.QuestSerializationModel[]>();
                    break;

                case "completedQuests":
                    instance.completedQuests = reader.Read <Devdog.QuestSystemPro.QuestSerializationModel[]>();
                    break;

                case "achievements":
                    instance.achievements = reader.Read <Devdog.QuestSystemPro.QuestSerializationModel[]>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        public override void ReadInto <T>(ES3Reader reader, object obj)
        {
            var    instance = (UnityEngine.ParticleSystem.InheritVelocityModule)obj;
            string propertyName;

            while ((propertyName = reader.ReadPropertyName()) != null)
            {
                switch (propertyName)
                {
                case "enabled":
                    instance.enabled = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                case "mode":
                    instance.mode = reader.Read <UnityEngine.ParticleSystemInheritVelocityMode>();
                    break;

                case "curve":
                    instance.curve = reader.Read <UnityEngine.ParticleSystem.MinMaxCurve>(ES3Type_MinMaxCurve.Instance);
                    break;

                case "curveMultiplier":
                    instance.curveMultiplier = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #16
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.UI.Image)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "m_Sprite":
                    reader.SetPrivateField("m_Sprite", reader.Read <UnityEngine.Sprite>(), instance);
                    break;

                case "m_Color":
                    reader.SetPrivateField("m_Color", reader.Read <UnityEngine.Color>(), instance);
                    break;

                case "sprite":
                    instance.sprite = reader.Read <UnityEngine.Sprite>(ES3Type_Sprite.Instance);
                    break;

                case "color":
                    instance.color = reader.Read <UnityEngine.Color>(ES3Type_Color.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #17
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (BattleSystem.CharacterDatabase)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "enemyList":
                    instance.enemyList = reader.Read <System.Collections.Generic.List <BattleSystem.Enemy> >();
                    break;

                case "partyMembers":
                    instance.partyMembers = reader.Read <System.Collections.Generic.List <BattleSystem.PartyMember> >();
                    break;

                case "activePartyMembers":
                    instance.activePartyMembers = reader.Read <System.Collections.Generic.List <System.String> >();
                    break;

                case "abilityList":
                    instance.abilityList = reader.Read <System.Collections.Generic.Dictionary <System.String, BattleSystem.Ability> >();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #18
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (Ling.AI.Move.AINormalTracking)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "_destination":
                    reader.SetPrivateField("_destination", reader.Read <Utility.ValueObject <UnityEngine.Vector2Int> >(), instance);
                    break;

                case "_destinationRoutes":
                    reader.SetPrivateField("_destinationRoutes", reader.Read <System.Collections.Generic.List <UnityEngine.Vector2Int> >(), instance);
                    break;

                case "_nextMovePos":
                    reader.SetPrivateField("_nextMovePos", reader.Read <Utility.ValueObject <UnityEngine.Vector2Int> >(), instance);
                    break;

                case "_prevPos":
                    reader.SetPrivateField("_prevPos", reader.Read <Utility.ValueObject <UnityEngine.Vector2Int> >(), instance);
                    break;

                case "_waitCount":
                    reader.SetPrivateField("_waitCount", reader.Read <System.Int32>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (Devdog.QuestSystemPro.TaskSerializationModel)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "key":
                    instance.key = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "progress":
                    instance.progress = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                case "startTime":
                    instance.startTime = reader.Read <System.Nullable <System.DateTime> >();
                    break;

                case "status":
                    instance.status = reader.Read <Devdog.QuestSystemPro.TaskStatus>();
                    break;

                case "gaveRewards":
                    instance.gaveRewards = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #20
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (UnitSave)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "UnitPosition":
                    instance.UnitPosition = reader.Read <UnityEngine.Vector3>(ES3Type_Vector3.Instance);
                    break;

                case "UnitRotation":
                    instance.UnitRotation = reader.Read <UnityEngine.Quaternion>(ES3Type_Quaternion.Instance);
                    break;

                case "CurrentHealth":
                    instance.CurrentHealth = reader.Read <System.Single>(ES3Type_float.Instance);
                    break;

                case "IsMelee":
                    instance.IsMelee = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                case "UnitID":
                    instance.UnitID = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #21
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (HK.AutoAnt.SaveData.Serializables.SerializableCell)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "RecordId":
                    instance.RecordId = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "Position":
                    instance.Position = reader.Read <UnityEngine.Vector2Int>(ES3Type_Vector2Int.Instance);
                    break;

                case "Group":
                    instance.Group = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
 protected override void ReadUnityObject <T>(ES3Reader reader, object obj)
 {
     foreach (string propertyName in reader.Properties)
     {
         reader.Skip();
     }
 }
Пример #23
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (System.Random)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "inext":
                    reader.SetPrivateField("inext", reader.Read <System.Int32>(), instance);
                    break;

                case "inextp":
                    reader.SetPrivateField("inextp", reader.Read <System.Int32>(), instance);
                    break;

                case "SeedArray":
                    reader.SetPrivateField("SeedArray", reader.Read <System.Int32[]>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #24
0
        protected override void ReadScriptableObject <T>(ES3Reader reader, object obj)
        {
            var instance = (HK.AutoAnt.CellControllers.Events.Road)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "size":
                    reader.SetPrivateField("size", reader.Read <System.Int32>(), instance);
                    break;

                case "Level":
                    instance.Level = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "Origin":
                    reader.SetPrivateProperty("Origin", reader.Read <UnityEngine.Vector2Int>(), instance);
                    break;

                case "name":
                    instance.name = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #25
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (BattleSystem.Ability)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "abilityName":
                    instance.abilityName = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "power":
                    instance.power = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "energyCost":
                    instance.energyCost = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "abilityType":
                    instance.abilityType = reader.Read <BattleSystem.Ability.AbilityType>();
                    break;

                case "targetPosition":
                    reader.SetPrivateField("targetPosition", reader.Read <UnityEngine.Vector3>(), instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #26
0
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (Item)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "id":
                    instance.id = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "itemName":
                    instance.itemName = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "description":
                    instance.description = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "icon":
                    instance.icon = reader.Read <UnityEngine.Sprite>(ES3Type_Sprite.Instance);
                    break;

                case "stats":
                    instance.stats = reader.Read <System.Collections.Generic.Dictionary <System.String, System.Int32> >();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #27
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.UI.Text)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "text":
                    instance.text = reader.Read <System.String>(ES3Type_string.Instance);
                    break;

                case "fontSize":
                    instance.fontSize = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "color":
                    instance.color = reader.Read <UnityEngine.Color>(ES3Type_Color.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
Пример #28
0
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (InventorySlot)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "amountInSlot":
                    instance.amountInSlot = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "isOccupied":
                    instance.isOccupied = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                case "thisBlock":
                    instance.thisBlock = reader.Read <UnityEngine.ScriptableObject>();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadComponent <T>(ES3Reader reader, object obj)
        {
            var instance = (UnityEngine.CapsuleCollider2D)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "size":
                    instance.size = reader.Read <UnityEngine.Vector2>(ES3Type_Vector2.Instance);
                    break;

                case "direction":
                    instance.direction = reader.Read <UnityEngine.CapsuleDirection2D>();
                    break;

                case "offset":
                    instance.offset = reader.Read <UnityEngine.Vector2>(ES3Type_Vector2.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }
        protected override void ReadObject <T>(ES3Reader reader, object obj)
        {
            var instance = (CitizenSave)obj;

            foreach (string propertyName in reader.Properties)
            {
                switch (propertyName)
                {
                case "CitizenPosition":
                    instance.CitizenPosition = reader.Read <UnityEngine.Vector3>(ES3Type_Vector3.Instance);
                    break;

                case "CitizenRotation":
                    instance.CitizenRotation = reader.Read <UnityEngine.Quaternion>(ES3Type_Quaternion.Instance);
                    break;

                case "CurrentJobID":
                    instance.CurrentJobID = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "CitizenID":
                    instance.CitizenID = reader.Read <System.Int32>(ES3Type_int.Instance);
                    break;

                case "isHappy":
                    instance.isHappy = reader.Read <System.Boolean>(ES3Type_bool.Instance);
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }
        }