mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-13 06:59:46 +07:00
little renaming
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ namespace IsoTools.Internal {
|
||||
return isActiveAndEnabled && gameObject.activeInHierarchy;
|
||||
}
|
||||
|
||||
protected IsoWorld FindFirstActiveParentWorld() {
|
||||
protected IsoWorld FindFirstActiveWorld() {
|
||||
IsoWorld ret_value = null;
|
||||
GetComponentsInParent<IsoWorld>(false, _tempWorlds);
|
||||
for ( int i = 0, e = _tempWorlds.Count; i < e; ++i ) {
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace IsoTools.Internal {
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
THold FindFirstActiveParent() {
|
||||
THold FindFirstActiveHolder() {
|
||||
THold ret_value = null;
|
||||
GetComponentsInParent<THold>(false, _tempHolders);
|
||||
for ( int i = 0, e = _tempHolders.Count; i < e; ++i ) {
|
||||
@@ -44,7 +44,7 @@ namespace IsoTools.Internal {
|
||||
public void RecacheHolder() {
|
||||
ResetHolder();
|
||||
if ( IsActive() ) {
|
||||
_holder = FindFirstActiveParent();
|
||||
_holder = FindFirstActiveHolder();
|
||||
if ( _holder ) {
|
||||
_holder.AddInstance(this as TInst);
|
||||
}
|
||||
|
||||
@@ -186,13 +186,11 @@ namespace IsoTools.Internal {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnDrawGizmos(IsoWorld iso_world) {
|
||||
if ( iso_world.isShowQuadTree ) {
|
||||
_quadTree.VisitAllBounds(_qtBoundsLU);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -35,10 +35,8 @@ namespace IsoTools.Internal {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnDrawGizmos() {
|
||||
}
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
@@ -160,27 +158,27 @@ namespace IsoTools.Internal {
|
||||
var cur_visibles = screen_solver.curVisibles;
|
||||
for ( int i = 0, e = cur_visibles.Count; i < e; ++i ) {
|
||||
start_depth = RecursivePlaceIsoObject(
|
||||
cur_visibles[i], start_depth, step_depth);
|
||||
cur_visibles[i], step_depth, start_depth);
|
||||
}
|
||||
}
|
||||
|
||||
float RecursivePlaceIsoObject(IsoObject iso_object, float depth, float step_depth) {
|
||||
float RecursivePlaceIsoObject(IsoObject iso_object, float step_depth, float start_depth) {
|
||||
if ( iso_object.Internal.Placed ) {
|
||||
return depth;
|
||||
return start_depth;
|
||||
}
|
||||
iso_object.Internal.Placed = true;
|
||||
var self_depends = iso_object.Internal.SelfDepends;
|
||||
for ( int i = 0, e = self_depends.Count; i < e; ++i ) {
|
||||
depth = RecursivePlaceIsoObject(self_depends[i], depth, step_depth);
|
||||
start_depth = RecursivePlaceIsoObject(self_depends[i], step_depth, start_depth);
|
||||
}
|
||||
if ( iso_object.mode == IsoObject.Mode.Mode3d ) {
|
||||
var zoffset = iso_object.Internal.Offset3d;
|
||||
var extents = iso_object.Internal.MinMax3d.size;
|
||||
PlaceIsoObject(iso_object, depth + extents * 0.5f + zoffset);
|
||||
return depth + extents + step_depth;
|
||||
PlaceIsoObject(iso_object, start_depth + extents * 0.5f + zoffset);
|
||||
return start_depth + extents + step_depth;
|
||||
} else {
|
||||
PlaceIsoObject(iso_object, depth);
|
||||
return depth + step_depth;
|
||||
PlaceIsoObject(iso_object, start_depth);
|
||||
return start_depth + step_depth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace IsoTools {
|
||||
public sealed class IsoParent : IsoBehaviour<IsoParent> {
|
||||
public IsoWorld isoWorld {
|
||||
get {
|
||||
return FindFirstActiveParentWorld();
|
||||
return FindFirstActiveWorld();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,6 @@ namespace IsoTools {
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[Header("Editor Only")]
|
||||
[SerializeField] bool _showIsoBounds = false;
|
||||
public bool isShowIsoBounds {
|
||||
@@ -323,7 +322,6 @@ namespace IsoTools {
|
||||
get { return _showQuadTree; }
|
||||
set { _showQuadTree = value; }
|
||||
}
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user