public AIMoveToDestinationSystem(CoreInteractiveObject CoreInteractiveObject, TransformMoveManagerComponentV3 AITransformMoveManagerComponentV3, OnAIInteractiveObjectDestinationReachedDelegate OnAIInteractiveObjectDestinationReached = null) { this.IsEnabled = true; this.objectAgent = CoreInteractiveObject.InteractiveGameObject.Agent; this.AITransformMoveManagerComponentV3 = AITransformMoveManagerComponentV3; this.aiPositionMoveManager = new AIPositionMoveManager(this.objectAgent, () => this.A_AIRotationMoveManager.CurrentLookingTargetRotation, AITransformMoveManagerComponentV3); this.AIDestinationManager = new AIDestinationManager(this.objectAgent, OnAIInteractiveObjectDestinationReached); this.A_AIRotationMoveManager = new AIRotationMoveManager(this.objectAgent, AITransformMoveManagerComponentV3, this.AIDestinationManager); }
public ObjectMovementSpeedSystem(CoreInteractiveObject associatedInteractiveObject, TransformMoveManagerComponentV3 aiTransformMoveManagerComponentV3, IObjectSpeedAttenuationValueSystem ObjectSpeedAttenuationValueSystem, ObjectSpeedCalculationType InitialObjectSpeedCalculationType) { AssociatedInteractiveObject = associatedInteractiveObject; AITransformMoveManagerComponentV3 = aiTransformMoveManagerComponentV3; this.ObjectSpeedCalculationType = InitialObjectSpeedCalculationType; this.ObjectSpeedAttenuationValueSystem = ObjectSpeedAttenuationValueSystem; this.ObjectMovementSpeedSystemState = new ObjectMovementSpeedSystemState() { LastFrameWorldPosition = this.AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.transform.position, }; }
public static float CalculateEffectiveSpeed_Unscaled_Attenuated(ObjectSpeedCalculationType ObjectSpeedCalculationType, CoreInteractiveObject CoreInteractiveObject, Vector3 LastFramePosition, TransformMoveManagerComponentV3 TransformMoveManagerComponentV3, float d) { var SpeedMagnitude = 0f; if (ObjectSpeedCalculationType == ObjectSpeedCalculationType.AGENT) { var agent = CoreInteractiveObject.InteractiveGameObject.Agent; if (agent != null && agent.hasPath) { SpeedMagnitude = Vector3.Distance(agent.transform.position, LastFramePosition) / d; SpeedMagnitude /= TransformMoveManagerComponentV3.SpeedMultiplicationFactor; } } return(SpeedMagnitude); }
public AIRotationFacingMoveManager(NavMeshAgent objectAgent, TransformMoveManagerComponentV3 aiTransformMoveManagerComponentV3) { this.objectAgent = objectAgent; AITransformMoveManagerComponentV3 = aiTransformMoveManagerComponentV3; }
public AIRotationMoveManager(NavMeshAgent objectAgent, TransformMoveManagerComponentV3 AITransformMoveManagerComponentV3, AIDestinationManager AIDestinationManagerRef) { this.objectAgent = objectAgent; this.AITransformMoveManagerComponentV3 = AITransformMoveManagerComponentV3; this.AIDestinationManagerRef = AIDestinationManagerRef; }
public PlayerAgentMoveManager(PlayerInteractiveObject playerAimingInteractiveObject, TransformMoveManagerComponentV3 TransformMoveManagerComponentV3, OnAIInteractiveObjectDestinationReachedDelegate OnDestinationReachedCallback = null) { this.PlayerInteractiveObject = playerAimingInteractiveObject; this.AIMoveToDestinationSystem = new AIMoveToDestinationSystem(playerAimingInteractiveObject, TransformMoveManagerComponentV3, OnDestinationReachedCallback); this.CurrentConstraint = new NoConstraint(); }
public AIPositionMoveManager(NavMeshAgent objectAgent, Func <Quaternion> CurrentLookingTargetRotationFromAIRotationMoveManager, TransformMoveManagerComponentV3 AITransformMoveManagerComponentV3) { this.objectAgent = objectAgent; this.CurrentLookingTargetRotationFromAIRotationMoveManager = CurrentLookingTargetRotationFromAIRotationMoveManager; this.AITransformMoveManagerComponentV3 = AITransformMoveManagerComponentV3; }