/// <summary>
        /// Configures the <see cref="SourceDistanceComparator"/> when an interactor is added.
        /// </summary>
        /// <param name="interactor">The added interactor.</param>
        protected virtual void OnInteractorAdded(GameObject interactor)
        {
            SourceDistanceComparator.Source  = interactor;
            SourceDistanceComparator.Target  = interactor;
            SourceDistanceComparator.enabled = interactor != null;
            SourceDistanceComparator.SavePosition();

            if (interactor != null)
            {
                Facade.BodyRepresentationFacade.Interest = BodyRepresentationProcessor.MovementInterest.CharacterController;
            }
        }
Пример #2
0
        /// <summary>
        /// Configures the <see cref="SourceDistanceComparator"/> when an interactor is added.
        /// </summary>
        /// <param name="interactor">The added interactor.</param>
        protected virtual void OnInteractorAdded(GameObject interactor)
        {
            SourceDistanceComparator.Source  = interactor;
            SourceDistanceComparator.Target  = interactor;
            SourceDistanceComparator.enabled = interactor != null;
            SourceDistanceComparator.SavePosition();

            if (interactor != null)
            {
                Facade.Target.InteractorAdded();
            }
        }