namespace VRTK.Prefabs.PlayAreaRepresentation { using UnityEngine; using Malimbe.MemberClearanceMethod; using Malimbe.PropertySerializationAttribute; using Malimbe.XmlDocumentationAttribute; using Malimbe.MemberChangeMethod; using Zinnia.Data.Attribute; /// /// The public interface into the PlayAreaRepresentation Prefab. /// public class PlayAreaRepresentationFacade : MonoBehaviour { #region Target Settings /// /// The target to represent the PlayArea. /// [Serialized, Cleared] [field: Header("Target Settings"), DocumentedByXml] public GameObject Target { get; set; } /// /// An optional origin to use in a position offset calculation. /// [Serialized, Cleared] [field: DocumentedByXml] public GameObject OffsetOrigin { get; set; } /// /// An optional destination to use in a position offset calculation. /// [Serialized, Cleared] [field: DocumentedByXml] public GameObject OffsetDestination { get; set; } #endregion #region Reference Settings /// /// The linked Internal Setup. /// [Serialized] [field: Header("Reference Settings"), DocumentedByXml, Restricted] public PlayAreaRepresentationConfigurator Configuration { get; protected set; } #endregion /// /// Recalculates the PlayArea dimensions. /// public virtual void Recalculate() { Configuration.RecalculateDimensions(); } /// /// Called after has been changed. /// [CalledAfterChangeOf(nameof(Target))] protected virtual void OnAfterTargetChange() { Configuration.ConfigureTarget(); } /// /// Called after has been changed. /// [CalledAfterChangeOf(nameof(OffsetOrigin))] protected virtual void OnAfterOffsetOriginChange() { Configuration.ConfigureOffsetOrigin(); } /// /// Called after has been changed. /// [CalledAfterChangeOf(nameof(OffsetDestination))] protected virtual void OnAfterOffsetDestinationChange() { Configuration.ConfigureOffsetDestination(); } } }