Esempio n. 1
0
 /// <summary>
 /// If 'latest_bounds' is false, then it will use cached bounds to calculate visibility.
 /// Otherwise, it will recalculate the bounds immediately.
 /// </summary>
 public bool CheckInView(Transform transform, bool force_to_refresh)
 {
     if (force_to_refresh)
     {
         cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera);
     }
     return(cached_bounds_.Contains(transform.position));
 }
Esempio n. 2
0
 public Bounds GetCachedCameraBounds(bool force_to_refresh)
 {
     if (force_to_refresh)
     {
         cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera);
     }
     return(cached_bounds_);
 }
Esempio n. 3
0
 void Update()
 {
     Track(target);
     cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera);
 }