Example #1
0
        void Start()
        {
            AttachedCamera = this.GetComponentIfNull(AttachedCamera);

            if (BoundsCheckerObject == null)
            {
                Debug.LogWarning("Bounds checker is null, cannot keep Camera within bounds");
                return;
            }

            boundsChecker = (IBoundsEnforcer)BoundsCheckerObject;
        }
Example #2
0
 /// <summary>
 /// Define the bounds that the camera must respect
 /// </summary>
 /// <param name="BoundsChecker">The bounds to be used</param>
 public void SetBoundsChecker(IBoundsEnforcer BoundsChecker)
 {
     boundsChecker = BoundsChecker;
 }