optimisation process 2

This commit is contained in:
2015-03-05 01:43:45 +06:00
parent c7b94d1bf6
commit 8a66813d72
12 changed files with 95044 additions and 1634 deletions

View File

@@ -19,7 +19,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath> <OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE</DefineConstants> <DefineConstants>DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn> <NoWarn>0169</NoWarn>

View File

@@ -19,7 +19,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath> <OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE</DefineConstants> <DefineConstants>DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn> <NoWarn>0169</NoWarn>

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@ SceneSettings:
--- !u!104 &2 --- !u!104 &2
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 5 serializedVersion: 6
m_Fog: 0 m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1} m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3 m_FogMode: 3
@@ -24,62 +24,6 @@ RenderSettings:
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1} m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1} m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1 m_AmbientIntensity: 1
m_AmbientProbe:
sh[ 0]: 0
sh[ 1]: 0
sh[ 2]: 0
sh[ 3]: 0
sh[ 4]: 0
sh[ 5]: 0
sh[ 6]: 0
sh[ 7]: 0
sh[ 8]: 0
sh[ 9]: 0
sh[10]: 0
sh[11]: 0
sh[12]: 0
sh[13]: 0
sh[14]: 0
sh[15]: 0
sh[16]: 0
sh[17]: 0
sh[18]: 0
sh[19]: 0
sh[20]: 0
sh[21]: 0
sh[22]: 0
sh[23]: 0
sh[24]: 0
sh[25]: 0
sh[26]: 0
m_AmbientProbeInGamma:
sh[ 0]: 0
sh[ 1]: 0
sh[ 2]: 0
sh[ 3]: 0
sh[ 4]: 0
sh[ 5]: 0
sh[ 6]: 0
sh[ 7]: 0
sh[ 8]: 0
sh[ 9]: 0
sh[10]: 0
sh[11]: 0
sh[12]: 0
sh[13]: 0
sh[14]: 0
sh[15]: 0
sh[16]: 0
sh[17]: 0
sh[18]: 0
sh[19]: 0
sh[20]: 0
sh[21]: 0
sh[22]: 0
sh[23]: 0
sh[24]: 0
sh[25]: 0
sh[26]: 0
m_AmbientMode: 3 m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0} m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5 m_HaloStrength: .5
@@ -92,7 +36,6 @@ RenderSettings:
m_ReflectionBounces: 1 m_ReflectionBounces: 1
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_GeneratedSkyboxReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
--- !u!127 &3 --- !u!127 &3
LevelGameManager: LevelGameManager:
@@ -100,11 +43,9 @@ LevelGameManager:
--- !u!157 &4 --- !u!157 &4
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 4 serializedVersion: 5
m_GIWorkflowMode: 0 m_GIWorkflowMode: 0
m_LightmapsModeLegacy: 1
m_LightmapsMode: 1 m_LightmapsMode: 1
m_UseDualLightmapsInForward: 0
m_GISettings: m_GISettings:
serializedVersion: 2 serializedVersion: 2
m_BounceScale: 1 m_BounceScale: 1
@@ -146,7 +87,7 @@ NavMeshSettings:
cellSize: .166666672 cellSize: .166666672
manualCellSize: 0 manualCellSize: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1001 &147462285 --- !u!1001 &373266025
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
@@ -155,15 +96,15 @@ Prefab:
m_Modifications: m_Modifications:
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 16 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 8 value: 32
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 16.666666 value: 66.6666641
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
@@ -187,80 +128,64 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.x propertyPath: _position.x
value: -1 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.y propertyPath: _position.y
value: -2
objectReference: {fileID: 0}
- target: {fileID: 117528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Name
value: Cube_1x1x4
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.z
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
--- !u!1001 &401898579 --- !u!1001 &583856369
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 48
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 8
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 33.3333321
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 0 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: _position.x propertyPath: _position.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.y
value: -2
objectReference: {fileID: 0}
- target: {fileID: 117528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Name
value: Cube_1x1x5
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.z
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11453620, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
propertyPath: _position.y
value: -1
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} m_ParentPrefab: {fileID: 100100000, guid: dbd21aa1b9a2cdf4a944f50e64d145a1, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
--- !u!1 &984653569 --- !u!1 &984653569
GameObject: GameObject:
@@ -363,177 +288,61 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 6
--- !u!1001 &1029562436 --- !u!1001 &1210758687
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -32 value: 32
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 66.6666641 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} - target: {fileID: 463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 11453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: _position.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 11453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: _position.y
value: -2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1128741087
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.z
value: 83.3333282
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 5 value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: _position.x propertyPath: _position.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 21217528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Color.r
value: 0
objectReference: {fileID: 0}
- target: {fileID: 21217528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Color.g
value: .875
objectReference: {fileID: 0}
- target: {fileID: 21217528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Color.b
value: .150862098
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1431224538
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.x
value: -16
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.y
value: 8
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.z
value: 33.3333321
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.y propertyPath: _position.y
value: -1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 117528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11463702, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
propertyPath: m_Name
value: Cube_1x1x3
objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.z propertyPath: _position.z
value: 2 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} m_ParentPrefab: {fileID: 100100000, guid: 6dac6372d911f0646a34e2e83f03c30c, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
--- !u!1001 &1514636816 --- !u!1001 &1455085887
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
@@ -550,7 +359,7 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 50 value: 16.666666
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
@@ -570,24 +379,120 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 3 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.x propertyPath: _position.x
value: -1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.y propertyPath: _position.y
value: -1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 117528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} - target: {fileID: 117528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: m_Name propertyPath: m_Name
value: Cube_1x1x2 value: Cube_1x1x2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
propertyPath: _position.z
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} m_ParentPrefab: {fileID: 100100000, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
--- !u!1001 &1577586909
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalPosition.x
value: -48
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalPosition.y
value: 8
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalPosition.z
value: 50
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 11462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: _position.x
value: -1
objectReference: {fileID: 0}
- target: {fileID: 11462204, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
propertyPath: _position.y
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: fb3806e9ed7ada045b1b57419ac1ee53, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1595152117
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalPosition.z
value: 83.3333282
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: _position.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
propertyPath: _position.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2}
m_IsPrefabParent: 0

View File

@@ -33,7 +33,7 @@ namespace IsoTools {
public Vector3 Size { public Vector3 Size {
get { return _size; } get { return _size; }
set { set {
_size = value; _size = IsoUtils.Vec3Max(value, Vector3.zero);
FixTransform(); FixTransform();
} }
} }

View File

@@ -21,6 +21,13 @@ namespace IsoTools {
Mathf.Approximately(a.z, b.z); Mathf.Approximately(a.z, b.z);
} }
public static Vector3 Vec3Abs(Vector3 v) {
return new Vector3(
Mathf.Abs(v.x),
Mathf.Abs(v.y),
Mathf.Abs(v.z));
}
public static Vector3 Vec3Ceil(Vector3 v) { public static Vector3 Vec3Ceil(Vector3 v) {
return new Vector3( return new Vector3(
Mathf.Ceil(v.x), Mathf.Ceil(v.x),

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
using System.Linq;
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
namespace IsoTools { namespace IsoTools {
@@ -38,25 +38,23 @@ namespace IsoTools {
} }
class SectorInfo { class SectorInfo {
public Vector3 Position = Vector3.zero; public List<int> Objects = new List<int>();
public List<int> Objects = new List<int>();
public List<SectorInfo> Depends = new List<SectorInfo>();
public SectorInfo(Vector3 position) {
Position = position;
}
} }
bool _dirty = true; bool _dirty = true;
Vector3 _sectorsNum = Vector3.zero;
List<SectorInfo> _sectors = new List<SectorInfo>();
List<ObjectInfo> _objects = new List<ObjectInfo>();
List<int> _depends = new List<int>();
TileTypes _lastTileType = TileTypes.Isometric; List<SectorInfo> _sectors = new List<SectorInfo>();
float _lastTileSize = 0.0f; Vector3 _sectorsNum = Vector3.zero;
float _lastMinDepth = 0.0f; Vector3 _sectorsMinNumPos = Vector3.zero;
float _lastMaxDepth = 0.0f;
float _lastSectorSize = 0.0f; List<ObjectInfo> _objects = new List<ObjectInfo>();
List<int> _depends = new List<int>();
TileTypes _lastTileType = TileTypes.Isometric;
float _lastTileSize = 0.0f;
float _lastMinDepth = 0.0f;
float _lastMaxDepth = 0.0f;
float _lastSectorSize = 0.0f;
[SerializeField] [SerializeField]
public TileTypes _tileType = TileTypes.Isometric; public TileTypes _tileType = TileTypes.Isometric;
@@ -103,7 +101,7 @@ namespace IsoTools {
} }
[SerializeField] [SerializeField]
public float _sectorSize = 5.0f; public float _sectorSize = 3.0f;
/// <summary>Sorting sector size.</summary> /// <summary>Sorting sector size.</summary>
public float SectorSize { public float SectorSize {
get { return _sectorSize; } get { return _sectorSize; }
@@ -227,90 +225,90 @@ namespace IsoTools {
} }
int SectorIndex(Vector3 num_pos) { int SectorIndex(Vector3 num_pos) {
return Mathf.RoundToInt( return Mathf.FloorToInt(
num_pos.z * _sectorsNum.x * _sectorsNum.y + num_pos.x + _sectorsNum.x * (num_pos.y + num_pos.z * _sectorsNum.y));
num_pos.y * _sectorsNum.x +
num_pos.x);
} }
Vector3 SectorNumPos(int index) { Vector3 SectorNumPos(int index) {
var z = Mathf.FloorToInt(index / (_sectorsNum.x * _sectorsNum.y)); var mz = _sectorsNum.x * _sectorsNum.y;
var y = Mathf.FloorToInt((index - (z * _sectorsNum.x * _sectorsNum.y)) / _sectorsNum.x); var my = _sectorsNum.x;
var x = index - (z * _sectorsNum.x * _sectorsNum.y) - (y * _sectorsNum.x); var vz = Mathf.FloorToInt(index / mz);
return new Vector3(x, y, z); var vy = Mathf.FloorToInt((index - vz * mz) / my);
var vx = Mathf.FloorToInt(index - vz * mz - vy * my);
return new Vector3(vx, vy, vz);
}
SectorInfo FindSector(Vector3 num_pos) {
if ( num_pos.x < 0 || num_pos.y < 0 || num_pos.z < 0 ) {
return null;
}
if ( num_pos.x >= _sectorsNum.x || num_pos.y >= _sectorsNum.y || num_pos.z >= _sectorsNum.z ) {
return null;
}
return _sectors[SectorIndex(num_pos)];
} }
void SetupSectors() { void SetupSectors() {
var iso_objects = GameObject.FindObjectsOfType<IsoObject>(); var iso_objects = GameObject.FindObjectsOfType<IsoObject>();
var min = Vector3.zero; _objects.Clear();
var max = Vector3.one; _objects.Capacity = iso_objects.Length;
foreach ( var iso_object in iso_objects ) {
min = IsoUtils.Vec3Min(min, iso_object.Position); Vector3 min_num_pos = -Vector3.one;
max = IsoUtils.Vec3Max(max, iso_object.Position + iso_object.Size); Vector3 max_num_pos = Vector3.one;
foreach ( var obj in iso_objects ) {
var obj_max_size = IsoUtils.Vec3Max(Vector3.one, obj.Size);
var obj_min_num_pos = IsoUtils.Vec3DivFloor(obj.Position, SectorSize);
var obj_max_num_pos = IsoUtils.Vec3DivCeil(obj.Position + obj_max_size, SectorSize);
min_num_pos = IsoUtils.Vec3Min(min_num_pos, obj_min_num_pos);
max_num_pos = IsoUtils.Vec3Max(max_num_pos, obj_max_num_pos);
_objects.Add(new ObjectInfo(_objects.Count, obj, obj_min_num_pos, obj_max_num_pos));
} }
_sectorsNum = IsoUtils.Vec3DivCeil(max - min, SectorSize); _sectorsNum = max_num_pos - min_num_pos;
_sectorsMinNumPos = min_num_pos;
_sectors.Clear(); _sectors.Clear();
_sectors.Capacity = Mathf.CeilToInt(_sectorsNum.x * _sectorsNum.y * _sectorsNum.z); _sectors.Capacity = Mathf.FloorToInt(_sectorsNum.x * _sectorsNum.y * _sectorsNum.z);
while ( _sectors.Count < _sectors.Capacity ) { while ( _sectors.Count < _sectors.Capacity ) {
var num_pos = SectorNumPos(_sectors.Count); _sectors.Add(new SectorInfo());
_sectors.Add(new SectorInfo(num_pos * SectorSize));
} }
_objects.Clear(); foreach ( var obj in _objects ) {
foreach ( var iso_object in iso_objects ) { obj.MinSector -= _sectorsMinNumPos;
var max_size = IsoUtils.Vec3Max(iso_object.Size, Vector3.one); obj.MaxSector -= _sectorsMinNumPos;
var min_sector = IsoUtils.Vec3DivFloor(iso_object.Position - min, SectorSize); IsoUtils.LookUpCube(obj.MinSector, obj.MaxSector, p => {
var max_sector = IsoUtils.Vec3DivCeil(iso_object.Position + max_size - min, SectorSize); var sector = FindSector(p);
if ( sector != null ) {
var obj_info = new ObjectInfo(_objects.Count, iso_object, min_sector, max_sector); sector.Objects.Add(obj.Index);
_objects.Add(obj_info); }
IsoUtils.LookUpCube(min_sector, max_sector, p => {
var index = SectorIndex(p);
_sectors[index].Objects.Add(obj_info.Index);
}); });
} }
} }
SectorInfo FindSector(Vector3 pos) { void LookUpSectorDepends(Vector3 num_pos, Action<SectorInfo> act) {
if ( pos.x < 0 || pos.y < 0 || pos.z < 0 ) { var ms = FindSector(num_pos);
return null; if ( ms != null ) {
} act(ms);
if ( pos.x >= _sectorsNum.x || pos.y >= _sectorsNum.y || pos.z >= _sectorsNum.z ) {
return null;
}
return _sectors[SectorIndex(pos)];
}
void SetupSectorDepends() { var s1 = FindSector(num_pos + new Vector3(-1, 0, 0));
IsoUtils.LookUpCube(Vector3.zero, _sectorsNum, p => { var s2 = FindSector(num_pos + new Vector3( 0, -1, 0));
var ms = FindSector(p); var s3 = FindSector(num_pos + new Vector3(-1, -1, 0));
if ( ms != null ) { if ( s1 != null ) act(s1);
ms.Depends.Add(ms); if ( s2 != null ) act(s2);
if ( s3 != null ) act(s3);
var s1 = FindSector(p + new Vector3(-1, 0, 0)); for ( var i = 1; i <= _sectorsNum.z ; ++i ) {
var s2 = FindSector(p + new Vector3( 0, -1, 0)); var ss1 = FindSector(num_pos + new Vector3( 0 - i, 0 - i, i + 1));
var s3 = FindSector(p + new Vector3(-1, -1, 0)); var ss2 = FindSector(num_pos + new Vector3(-1 - i, 0 - i, i + 1));
if ( s1 != null ) ms.Depends.Add(s1); var ss3 = FindSector(num_pos + new Vector3( 0 - i, -1 - i, i + 1));
if ( s2 != null ) ms.Depends.Add(s2); var ss4 = FindSector(num_pos + new Vector3(-1 - i, -1 - i, i + 1));
if ( s3 != null ) ms.Depends.Add(s3); if ( ss1 != null ) act(ss1);
if ( ss2 != null ) act(ss2);
for ( var i = 1; i < _sectorsNum.z; ++i ) { if ( ss3 != null ) act(ss3);
var ss1 = FindSector(p + new Vector3( 0 - i, 0 - i, i + 1)); if ( ss4 != null ) act(ss4);
var ss2 = FindSector(p + new Vector3(-1 - i, 0 - i, i + 1));
var ss3 = FindSector(p + new Vector3( 0 - i, -1 - i, i + 1));
var ss4 = FindSector(p + new Vector3(-1 - i, -1 - i, i + 1));
if ( ss1 != null ) ms.Depends.Add(ss1);
if ( ss2 != null ) ms.Depends.Add(ss2);
if ( ss3 != null ) ms.Depends.Add(ss3);
if ( ss4 != null ) ms.Depends.Add(ss4);
}
} }
}); }
} }
void SetupObjectDepends() { void SetupObjectDepends() {
@@ -319,8 +317,7 @@ namespace IsoTools {
obj_a.Init(_depends.Count); obj_a.Init(_depends.Count);
var obj_ao = obj_a.IsoObject; var obj_ao = obj_a.IsoObject;
IsoUtils.LookUpCube(obj_a.MinSector, obj_a.MaxSector, p => { IsoUtils.LookUpCube(obj_a.MinSector, obj_a.MaxSector, p => {
var index = SectorIndex(p); LookUpSectorDepends(p, sec => {
foreach ( var sec in _sectors[index].Depends ) {
foreach ( var obj_bi in sec.Objects ) { foreach ( var obj_bi in sec.Objects ) {
var obj_bo = _objects[obj_bi].IsoObject; var obj_bo = _objects[obj_bi].IsoObject;
if ( obj_ao != obj_bo && IsDepends(obj_ao.Position, obj_ao.Size, obj_bo.Position, obj_bo.Size) ) { if ( obj_ao != obj_bo && IsDepends(obj_ao.Position, obj_ao.Size, obj_bo.Position, obj_bo.Size) ) {
@@ -328,7 +325,7 @@ namespace IsoTools {
++obj_a.EndDepend; ++obj_a.EndDepend;
} }
} }
} });
}); });
//Debug.LogFormat("{0} --- {1}" , obj_a.IsoObject.Position, obj_a.EndDepend - obj_a.BeginDepend); //Debug.LogFormat("{0} --- {1}" , obj_a.IsoObject.Position, obj_a.EndDepend - obj_a.BeginDepend);
} }
@@ -369,10 +366,9 @@ namespace IsoTools {
void StepSort() { void StepSort() {
if ( _dirty ) { if ( _dirty ) {
SetupSectors(); SetupSectors();
SetupSectorDepends();
SetupObjectDepends(); SetupObjectDepends();
SetupAllObjects(); SetupAllObjects();
//_dirty = false; _dirty = false;
} }
} }
@@ -383,11 +379,11 @@ namespace IsoTools {
void LateUpdate() { void LateUpdate() {
if ( Application.isEditor ) { if ( Application.isEditor ) {
if ( _lastTileType != _tileType ) TileType = _tileType; if ( _lastTileType != _tileType ) TileType = _tileType;
if ( !Mathf.Approximately(_lastTileSize, _tileSize ) ) TileSize = _tileSize; if ( !Mathf.Approximately(_lastTileSize, _tileSize ) ) TileSize = _tileSize;
if ( !Mathf.Approximately(_lastMinDepth, _minDepth ) ) MinDepth = _minDepth; if ( !Mathf.Approximately(_lastMinDepth, _minDepth ) ) MinDepth = _minDepth;
if ( !Mathf.Approximately(_lastMaxDepth, _maxDepth ) ) MaxDepth = _maxDepth; if ( !Mathf.Approximately(_lastMaxDepth, _maxDepth ) ) MaxDepth = _maxDepth;
if ( !Mathf.Approximately(_lastSectorSize, _sectorSize ) ) SectorSize = _sectorSize; if ( !Mathf.Approximately(_lastSectorSize, _sectorSize) ) SectorSize = _sectorSize;
} }
StepSort(); StepSort();
} }

View File

@@ -111,7 +111,7 @@ PlayerSettings:
iPadHighResPortraitSplashScreen: {fileID: 0} iPadHighResPortraitSplashScreen: {fileID: 0}
iPadLandscapeSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0}
iPadHighResLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0}
iOSCustomLaunchScreenType: 0 iOSLaunchScreenType: 0
iOSLaunchScreenPortrait: {fileID: 0} iOSLaunchScreenPortrait: {fileID: 0}
iOSLaunchScreenLandscape: {fileID: 0} iOSLaunchScreenLandscape: {fileID: 0}
iOSLaunchScreenBackgroundColor: iOSLaunchScreenBackgroundColor:

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 5.0.0f1 m_EditorVersion: 5.0.0f4
m_StandardAssetsVersion: 0 m_StandardAssetsVersion: 0

View File

@@ -17,7 +17,7 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj StartupItem = Assembly-CSharp.csproj
Policies = $0 Policies = $0
$0.TextStylePolicy = $1 $0.TextStylePolicy = $1

View File

@@ -17,7 +17,7 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj StartupItem = Assembly-CSharp.csproj
Policies = $0 Policies = $0
$0.TextStylePolicy = $1 $0.TextStylePolicy = $1

View File

@@ -2,7 +2,9 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/IsoTools/Scripts/IsoWorld.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="Assets/IsoTools/Scripts/IsoWorld.cs">
<Files> <Files>
<File FileName="Assets/IsoTools/Scripts/IsoWorld.cs" Line="355" Column="28" /> <File FileName="Assets/IsoTools/Scripts/IsoObject.cs" Line="154" Column="9" />
<File FileName="Assets/IsoTools/Scripts/IsoUtils.cs" Line="1" Column="1" />
<File FileName="Assets/IsoTools/Scripts/IsoWorld.cs" Line="371" Column="5" />
</Files> </Files>
</MonoDevelop.Ide.Workbench> </MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints> <MonoDevelop.Ide.DebuggingService.Breakpoints>