public void SetUp(ISOBasis basis = null)
 {
     if (basis == null)
     {
         basis = gameObject.AddComponent <ISOBasis>();
     }
     _ISOBasis = basis;
     Update_SortingOrder(true);
 }
Example #2
0
 void OnEnable()
 {
     if (target != null && (bPrefab = PrefabUtility.GetPrefabType(target).Equals(PrefabType.Prefab)))
     {
         return;
     }
     _targetIsoBasis = target as ISOBasis;
     _ISOTarget      = _targetIsoBasis.GetComponent <IISOBasis>();
     _spDoNotDestroyAutomatically = serializedObject.FindProperty("bDoNotDestroyAutomatically");
     _spISOOffest          = serializedObject.FindProperty("_ISO_Offset");
     _spOnGroundObject     = serializedObject.FindProperty("isOnGroundObject");
     _spTransformsForFudge = serializedObject.FindProperty("transforms");
 }
Example #3
0
        Vector3 GetOffsetViaParentRC()
        {
            ISOBasis parent = Parent;

            if (parent == null)
            {
                return(isOnGroundObject ? IsoMap.instance.VOnGroundOffset : Vector3.zero);
            }

            Bounds  bounds = parent.GetBounds();
            Vector3 vBasis = parent.getSortingOrderBasis(bounds) - bounds.center;

            return(vBasis + parent.GetOffsetViaParentRC());
        }
Example #4
0
        void OnEnable()
        {
            _targetIsoBasis = target as ISOBasis;
            if (target != null && (bPrefab = PrefabHelper.IsPrefab(_targetIsoBasis.gameObject)))
            {
                return;
            }

            _ISOTarget = _targetIsoBasis.GetComponent <IISOBasis>();
            _spDoNotDestroyAutomatically = serializedObject.FindProperty("bDoNotDestroyAutomatically");
            _spISOOffest          = serializedObject.FindProperty("_ISO_Offset");
            _spOnGroundObject     = serializedObject.FindProperty("isOnGroundObject");
            _spTransformsForFudge = serializedObject.FindProperty("transforms");
        }
 public void Remove()
 {
     _ISOBasis = null;
     Update_SortingOrder(true);
 }