protected override void ReadProperties(INeoDeserializer reader, CompassPro to, NeoSerializedGameObject nsgo)
        {
            int fogSize;

            if (reader.TryReadValue(k_FogSizeKey, out fogSize, 0))
            {
                Color32[] fogData;
                if (reader.TryReadValues(k_FogDataKey, out fogData, null))
                {
                    to.StartCoroutine(DelayedSetData(to, fogData, fogSize));
                }
            }
        }
Пример #2
0
        protected override void ReadProperties(INeoDeserializer reader, EmeraldAISystem to, NeoSerializedGameObject nsgo)
        {
            reader.TryReadValue(k_CurrentHealthKey, out to.CurrentHealth, to.CurrentHealth);
            reader.TryReadValue(k_CurrentDamageKey, out to.CurrentDamageAmount, to.CurrentDamageAmount);
            reader.TryReadValue(k_CurrentAggroHitsKey, out to.CurrentAggroHits, to.CurrentAggroHits);
            reader.TryReadValue(k_IsDeadKey, out to.IsDead, to.IsDead);

            reader.TryReadValues(k_ActiveEffectsKey, to.ActiveEffects);

            reader.TryReadTransformReference(k_CurrentTargetKey, out to.CurrentTarget, nsgo);
            reader.TryReadTransformReference(k_CurrentFollowKey, out to.CurrentFollowTarget, nsgo);

            /*
             * Properties to investigate. Current save is very basic
             *
             *
             * if (to.MeleeAttacks.Count > 0)
             * {
             *  reader.TryReadValue("", out to.MeleeAttackIndex, to.MeleeAttackIndex);
             *  reader.TryReadValue("", out to.MeleeAttacksListIndex, to.MeleeAttacksListIndex);
             *  reader.TryReadValue("", out to.CurrentAnimationIndex, to.CurrentAnimationIndex);
             *  reader.TryReadValue("", out to.AttackTimer, to.AttackTimer);
             * }
             *
             * if (to.MeleeRunAttacks.Count > 0)
             * {
             *  reader.TryReadValue("", out to.MeleeRunAttackIndex, to.MeleeRunAttackIndex);
             *  reader.TryReadValue("", out to.MeleeRunAttacksListIndex, to.MeleeRunAttacksListIndex);
             *  reader.TryReadValue("", out to.CurrentRunAttackAnimationIndex, to.CurrentRunAttackAnimationIndex);
             *  reader.TryReadValue("", out to.RunAttackTimer, to.RunAttackTimer);
             *  reader.TryReadValue("", out to.RunAttackSpeed, to.RunAttackSpeed);
             * }
             *
             * if (to.OffensiveAbilities.Count > 0)
             * {
             *  reader.TryReadValue("", out to.OffensiveAbilityIndex, to.OffensiveAbilityIndex);
             * }
             *
             * if (to.SupportAbilities.Count > 0)
             * {
             *  reader.TryReadValue("", out to.SupportAbilityIndex, to.SupportAbilityIndex);
             * }
             *
             * if (to.SummoningAbilities.Count > 0)
             * {
             *  reader.TryReadValue("", out to.SummoningAbilityIndex, to.SummoningAbilityIndex);
             *  reader.TryReadValue("", out to.TotalSummonedAI, to.TotalSummonedAI);
             *
             *  //CurrentSummoner ?? EmeraldAI Ref
             * }
             *
             * reader.TryReadValue("", out to.HealingCooldownTimer, to.HealingCooldownTimer); // Private
             * reader.TryReadValue("", out to.m_AbilityPicked, to.m_AbilityPicked);
             * reader.TryReadValue("", out to.m_InitialTargetPosition, to.m_InitialTargetPosition);
             * reader.TryReadValue("", out to.ObstructionTimer, to.ObstructionTimer);
             * reader.TryReadValue("", out to.m_ObstructedTimer, to.m_ObstructedTimer); // Private
             * reader.TryReadValue("", out to.m_ProjectileCollisionPoint, to.m_ProjectileCollisionPoint);
             *
             * reader.TryReadValue("", out to.ReturnToStationaryPosition, to.ReturnToStationaryPosition);
             * reader.TryReadValue("", out to.SurfaceNormal, to.SurfaceNormal);
             * reader.TryReadValue("", out to.NormalRotation, to.NormalRotation); // Private
             * reader.TryReadValue("", out to.AngleCheckTimer, to.AngleCheckTimer); // Private
             *
             * reader.TryReadValue("", out to.CurrentMovementState, to.CurrentMovementState); // Private
             * reader.TryReadValue("", out to.CurrentBlockingState, to.CurrentBlockingState); // Private
             *
             * reader.TryReadValue("", out to.BackingUpTimer, to.BackingUpTimer);
             * reader.TryReadValue("", out to.BackingUpSeconds, to.BackingUpSeconds);
             * reader.TryReadValue("", out to.BackupDestination, to.BackupDestination);
             *
             * reader.TryReadValue("", out to.Attacking, to.Attacking);
             * reader.TryReadValue("", out to.GettingHit, to.GettingHit);
             *
             * reader.TryReadValue("", out to.m_SwitchingWeaponTypes, to.m_SwitchingWeaponTypes);
             * reader.TryReadValue("", out to.m_WeaponTypeSwitchDelay, to.m_WeaponTypeSwitchDelay); // Private
             *
             * reader.TryReadValue("", out to.AngleToTurn, to.AngleToTurn);
             * reader.TryReadValue("", out to.AlignmentSpeed, to.AlignmentSpeed);
             *
             * reader.TryReadValue("", out to.IdleAnimationTimer, to.IdleAnimationTimer); // Private
             *
             * if (to.IsMoving)
             * {
             *  reader.TryReadValue("", out to.WaypointTimer, to.WaypointTimer);
             *  reader.TryReadValue("", out to.WaypointIndex, to.WaypointIndex);
             *  reader.TryReadValue("", out to.m_LastWaypointIndex, to.m_LastWaypointIndex); // Private
             *
             *  reader.TryReadValue("", out to.NewDestination, to.NewDestination);
             *  reader.TryReadValue("", out to.DistanceFromDestination, to.DistanceFromDestination); // Private
             *  reader.TryReadValue("", out to.TargetDestination, to.TargetDestination);
             *  reader.TryReadValue("", out to.DestinationAdjustedAngle, to.DestinationAdjustedAngle);
             *  reader.TryReadValue("", out to.DestinationDirection, to.DestinationDirection); // Private
             *  reader.TryReadValue("", out to.SingleDestination, to.SingleDestination);
             *
             *  reader.TryReadValue("", out to.Velocity, to.Velocity); // Private
             *  reader.TryReadValue("", out to.AdjustedSpeed, to.AdjustedSpeed); // Private
             *
             *  reader.TryReadValue("", out to.TargetQ, to.TargetQ); // Private
             *  reader.TryReadValue("", out to.GroundQ, to.GroundQ); // Private
             *
             *  reader.TryReadValue("", out to.PreviousAngle, to.PreviousAngle); // Private
             * }
             */
        }