public void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo) { reader.TryReadValue(k_VelocityKey, out m_Velocity, m_Velocity); reader.TryReadValue(k_ReleaseKey, out m_Release, m_Release); reader.TryReadValue(k_DistanceKey, out m_Distance, m_Distance); int layerMask = m_Layers; if (reader.TryReadValue(k_LayersKey, out layerMask, layerMask)) { m_Layers = layerMask; } Vector3 position; if (reader.TryReadValue(k_PositionKey, out position, Vector3.zero)) { m_LerpFromPosition = position; m_LerpToPosition = position; localTransform.position = position; } IAmmoEffect serializedAmmoEffect; if (reader.TryReadComponentReference(k_AmmoEffectKey, out serializedAmmoEffect, nsgo)) { m_AmmoEffect = serializedAmmoEffect; } IDamageSource serializedDamageSource; if (reader.TryReadComponentReference(k_DamageSourceKey, out serializedDamageSource, nsgo)) { m_DamageSource = serializedDamageSource; } }
public override void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo) { base.ReadProperties(reader, nsgo); int layers = m_Layers; if (reader.TryReadValue(k_LayersKey, out layers, layers)) { collisionLayers = layers; } }
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)); } } }
protected override void ReadProperties(INeoDeserializer reader, CompassProPOI to, NeoSerializedGameObject nsgo) { Debug.Log("Loading POI"); reader.TryReadValue(k_VisitedKey, out to.isVisited, to.isVisited); bool heartbeat; if (reader.TryReadValue(k_HeartbeatKey, out heartbeat, false)) { if (!to.heartbeatIsActive) { to.StartHeartbeat(); } } }
public virtual void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo) { float floatValue = 0f; if (reader.TryReadValue(k_HealthMaxKey, out floatValue, healthMax)) { healthMax = floatValue; } if (reader.TryReadValue(k_HealthKey, out floatValue, health)) { health = floatValue; } bool boolValue = true; if (reader.TryReadValue(k_IsAliveKey, out boolValue, boolValue)) { isAlive = boolValue; } }
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 * } */ }
public override void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo) { base.ReadProperties(reader, nsgo); }
public void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo) { reader.TryReadValue(k_PoiIndexKey, out poiNumber, poiNumber); }