1- using System . Collections ;
2- using System . Collections . Generic ;
3- using System . Linq ;
4- using UnityEngine ;
5-
6- namespace SanAndreasUnity . Utilities
1+ namespace SanAndreasUnity . Importing
72{
83
94public class ZoneHelpers
@@ -392,14 +387,14 @@ public class ZoneHelpers
392387
393388public class Zone
394389{
395- public Vector3 vmin , vmax ;
390+ public UnityEngine . Vector3 vmin , vmax ;
396391
397- public Vector2 minPos2D { get { return new Vector2 ( this . vmin . x , this . vmin . z ) ; } }
398- public Vector2 maxPos2D { get { return new Vector2 ( this . vmax . x , this . vmax . z ) ; } }
399- public Vector3 centerPos { get { return ( this . vmin + this . vmax ) * 0.5f ; } }
392+ public UnityEngine . Vector2 minPos2D { get { return new UnityEngine . Vector2 ( this . vmin . x , this . vmin . z ) ; } }
393+ public UnityEngine . Vector2 maxPos2D { get { return new UnityEngine . Vector2 ( this . vmax . x , this . vmax . z ) ; } }
394+ public UnityEngine . Vector3 centerPos { get { return ( this . vmin + this . vmax ) * 0.5f ; } }
400395
401- public float volume { get { Vector3 size = this . vmax - this . vmin ; return size . x * size . y * size . z ; } }
402- public float squaredSize { get { Vector2 size = this . maxPos2D - this . minPos2D ; return size . x * size . y ; } }
396+ public float volume { get { UnityEngine . Vector3 size = this . vmax - this . vmin ; return size . x * size . y * size . z ; } }
397+ public float squaredSize { get { UnityEngine . Vector2 size = this . maxPos2D - this . minPos2D ; return size . x * size . y ; } }
403398
404399public string name ;
405400
@@ -410,12 +405,12 @@ public class Zone
410405
411406public Zone ( int x1 , int z1 , int y1 , int x2 , int z2 , int y2 , string n )
412407{
413- vmin = new Vector3 ( x1 , y1 , z1 ) ;
414- vmax = new Vector3 ( x2 , y2 , z2 ) ;
408+ vmin = new UnityEngine . Vector3 ( x1 , y1 , z1 ) ;
409+ vmax = new UnityEngine . Vector3 ( x2 , y2 , z2 ) ;
415410name = n ;
416411}
417412
418- public static string GetZoneName ( Zone [ ] zones , Vector3 worldPos )
413+ public static string GetZoneName ( Zone [ ] zones , UnityEngine . Vector3 worldPos )
419414{
420415float minVolume = float . PositiveInfinity ;
421416Zone targetZone = null ;
@@ -440,7 +435,7 @@ public static string GetZoneName(Zone[] zones, Vector3 worldPos)
440435return defaultZoneName ;
441436}
442437
443- public static string GetZoneName ( Zone [ ] zones , Vector2 worldPos2D )
438+ public static string GetZoneName ( Zone [ ] zones , UnityEngine . Vector2 worldPos2D )
444439{
445440float minSquaredSize = float . PositiveInfinity ;
446441Zone targetZone = null ;
@@ -465,24 +460,24 @@ public static string GetZoneName(Zone[] zones, Vector2 worldPos2D)
465460return defaultZoneName ;
466461}
467462
468- public static string GetZoneName ( Vector3 worldPos , bool use2DPos = false )
463+ public static string GetZoneName ( UnityEngine . Vector3 worldPos , bool use2DPos = false )
469464{
470465if ( use2DPos )
471466return GetZoneName ( worldPos . ToVec2WithXAndZ ( ) ) ;
472467return GetZoneName ( ZoneHelpers . zoneInfoList , worldPos ) ;
473468}
474469
475- public static string GetZoneName ( Vector2 worldPos2D )
470+ public static string GetZoneName ( UnityEngine . Vector2 worldPos2D )
476471{
477472return GetZoneName ( ZoneHelpers . zoneInfoList , worldPos2D ) ;
478473}
479474
480- public static bool IsInside ( Vector3 p , Vector3 vmin , Vector3 vmax )
475+ public static bool IsInside ( UnityEngine . Vector3 p , UnityEngine . Vector3 vmin , UnityEngine . Vector3 vmax )
481476{
482477return p . x >= vmin . x && p . x <= vmax . x && p . y >= vmin . y && p . y <= vmax . y && p . z >= vmin . z && p . z <= vmax . z ;
483478}
484479
485- public static bool IsInside ( Vector2 pos , Zone zone )
480+ public static bool IsInside ( UnityEngine . Vector2 pos , Zone zone )
486481{
487482return pos . x >= zone . vmin . x && pos . x <= zone . vmax . x && pos . y >= zone . vmin . z && pos . y <= zone . vmax . z ;
488483}