コード例 #1
0
 public static bool RemoveBoundary(Moba_Camera_Boundary boundary, Moba_Camera_Boundaries.BoundaryType type)
 {
     if (type == Moba_Camera_Boundaries.BoundaryType.cube)
     {
         return(Moba_Camera_Boundaries.cube_boundaries.Remove(boundary));
     }
     return(type == Moba_Camera_Boundaries.BoundaryType.sphere && Moba_Camera_Boundaries.cube_boundaries.Remove(boundary));
 }
コード例 #2
0
 public static bool AddBoundary(Moba_Camera_Boundary boundary, Moba_Camera_Boundaries.BoundaryType type)
 {
     if (boundary == null)
     {
         return(false);
     }
     if (type == Moba_Camera_Boundaries.BoundaryType.cube)
     {
         Moba_Camera_Boundaries.cube_boundaries.Add(boundary);
         return(true);
     }
     if (type == Moba_Camera_Boundaries.BoundaryType.sphere)
     {
         Moba_Camera_Boundaries.sphere_boundaries.Add(boundary);
         return(true);
     }
     return(false);
 }
コード例 #3
0
 public static bool AddBoundary(Moba_Camera_Boundary boundary, Moba_Camera_Boundaries.BoundaryType type)
 {
     if (boundary == null)
     {
         Debug.LogWarning("Name: " + boundary.name + "; Error: AddBoundary() - null boundary passed");
         return(false);
     }
     if (type == Moba_Camera_Boundaries.BoundaryType.cube)
     {
         Moba_Camera_Boundaries.cube_boundaries.Add(boundary);
         return(true);
     }
     if (type == Moba_Camera_Boundaries.BoundaryType.sphere)
     {
         Moba_Camera_Boundaries.sphere_boundaries.Add(boundary);
         return(true);
     }
     Debug.LogWarning("Name: " + boundary.name + "; Error: AddBoundary() - Incorrect BoundaryType, boundary will not be used");
     return(false);
 }