38 changed files with 3641 additions and 2 deletions
@ -0,0 +1,212 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
using UnityEditor; |
||||
using UnityEngine.AI; |
||||
using System.IO; |
||||
using System.Text; |
||||
using System; |
||||
|
||||
public class SceneToolFloor |
||||
{ |
||||
[MenuItem("SceneTool/SetFloorMessage")]//添加FloorMessage脚本绑定楼层信息 |
||||
public static void SetFloorMessage() |
||||
{ |
||||
Transform neiParent = GameObject.Find("shinei").transform.GetChild(0); |
||||
for (int i = 0; i < neiParent.childCount; i++) |
||||
{ |
||||
//Debug.Log(neiParent.GetChild(i).name); |
||||
if (!neiParent.GetChild(i).GetComponent<FloorMessage>()) |
||||
{ |
||||
neiParent.GetChild(i).gameObject.AddComponent<FloorMessage>(); |
||||
} |
||||
FloorMessage msg = neiParent.GetChild(i).GetComponent<FloorMessage>(); |
||||
msg.targetTrans = GetTarget(neiParent.GetChild(i)); |
||||
msg.buildNum = neiParent.name; |
||||
if (!neiParent.GetChild(i).name.ToLower().Contains("m")) |
||||
{ |
||||
string floornum = neiParent.GetChild(i).name.Substring |
||||
(neiParent.GetChild(i).name.ToLower().IndexOf("nei") + 3/*, neiParent.GetChild(i).name.Length - 4*/); |
||||
|
||||
msg.floorNum = int.Parse(floornum); |
||||
msg.interlayerNum = 0; |
||||
} |
||||
else |
||||
{ |
||||
msg.floorNum = int.Parse(neiParent.GetChild(i).name.Substring |
||||
(neiParent.GetChild(i).name.ToLower().IndexOf("nei") + 3, neiParent.GetChild(i).name.ToLower().IndexOf("m") |
||||
- neiParent.GetChild(i).name.ToLower().IndexOf("nei") - 4)); |
||||
msg.interlayerNum = int.Parse(neiParent.GetChild(i).name.Substring |
||||
(neiParent.GetChild(i).name.ToLower().IndexOf("m") + 1, neiParent.GetChild(i).name.Length - |
||||
neiParent.GetChild(i).name.ToLower().IndexOf("m") - 1)); |
||||
} |
||||
} |
||||
Transform waiParent = GameObject.Find("shiwai").transform.GetChild(0); |
||||
for (int i = 0; i < waiParent.childCount; i++) |
||||
{ |
||||
//Debug.Log(waiParent.GetChild(i).name); |
||||
if (!waiParent.GetChild(i).GetComponent<FloorMessage>()) |
||||
{ |
||||
waiParent.GetChild(i).gameObject.AddComponent<FloorMessage>(); |
||||
} |
||||
FloorMessage msg = waiParent.GetChild(i).GetComponent<FloorMessage>(); |
||||
msg.buildNum = waiParent.name; |
||||
if (!waiParent.GetChild(i).name.ToLower().Contains("m")) |
||||
{ |
||||
string floornum = waiParent.GetChild(i).name.Substring |
||||
(waiParent.GetChild(i).name.ToLower().IndexOf("wai") + 3/*, waiParent.GetChild(i).name.Length - 4*/); |
||||
msg.floorNum = int.Parse(floornum); |
||||
msg.interlayerNum = 0; |
||||
} |
||||
else |
||||
{ |
||||
msg.floorNum = int.Parse(waiParent.GetChild(i).name.Substring |
||||
(waiParent.GetChild(i).name.ToLower().IndexOf("wai") + 4, waiParent.GetChild(i).name.ToLower().IndexOf("m") |
||||
- waiParent.GetChild(i).name.ToLower().IndexOf("wai") - 4)); |
||||
msg.interlayerNum = int.Parse(waiParent.GetChild(i).name.Substring |
||||
(waiParent.GetChild(i).name.ToLower().IndexOf("m") + 1, waiParent.GetChild(i).name.Length - |
||||
waiParent.GetChild(i).name.ToLower().IndexOf("m") - 1)); |
||||
} |
||||
} |
||||
} |
||||
static Transform GetTarget(Transform parent) |
||||
{ |
||||
for (int i = 0; i < parent.childCount; i++) |
||||
{ |
||||
if (parent.GetChild(i).name.ToLower().Contains("_floor") |
||||
|| parent.GetChild(i).name.ToLower().Contains("-floor") |
||||
) |
||||
{ |
||||
return parent.GetChild(i); |
||||
} |
||||
} |
||||
|
||||
return parent; |
||||
} |
||||
[MenuItem("SceneTool/SetNavLayershinei")]//添加寻路层(选中shinei对象设置,注:扶梯情况特殊没有包含) |
||||
public static void SetNavLayer() |
||||
{ |
||||
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep); |
||||
for (int i = 0; i < obj.Length; i++) |
||||
{ |
||||
if (obj[i].name.ToLower().Contains("_floor") ||//地面 |
||||
obj[i].name.ToLower().Contains("_floor")) |
||||
{ |
||||
Debug.Log(obj[i].name); |
||||
// obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad"); |
||||
// if (!obj[i].gameObject.GetComponent<MeshCollider>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<MeshCollider>(); |
||||
// } |
||||
// if (!obj[i].gameObject.GetComponent<PathFindable>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<PathFindable>(); |
||||
// } |
||||
// if (!obj[i].gameObject.GetComponent<CloneGameObjInfo>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<CloneGameObjInfo>(); |
||||
// } |
||||
// if (!obj[i].gameObject.GetComponent<CloneableEnums>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<CloneableEnums>(); |
||||
// } |
||||
// CloneableEnums enumParent = obj[i].gameObject.GetComponent<CloneableEnums>(); |
||||
// GameObject CarRoad = GameObject.Find("FloorNei"); |
||||
// var CloneableEnums = CarRoad.GetComponent<CloneableEnums>(); |
||||
// enumParent.CloneableTypes = CloneableEnums.CloneableTypes; |
||||
// if (obj[i].parent.GetComponent<FloorMessage>()) |
||||
// { |
||||
// FloorMessage fmg = obj[i].parent.GetComponent<FloorMessage>(); |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum; |
||||
// } |
||||
// if (obj[i].parent.parent.GetComponent<FloorMessage>()) |
||||
// { |
||||
// FloorMessage fmg = obj[i].parent.parent.GetComponent<FloorMessage>(); |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().gameObjType = CloneObjType.StaticGameObject; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().buildNum = fmg.buildNum; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().floorNum = fmg.floorNum; |
||||
// obj[i].gameObject.GetComponent<CloneGameObjInfo>().interlayerNum = fmg.interlayerNum; |
||||
// } |
||||
//} |
||||
//if (obj[i].name.ToLower().Contains("_wall") ||//墙面 |
||||
// obj[i].name.ToLower().Contains("_wall")) |
||||
//{ |
||||
// obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad"); |
||||
// if (!obj[i].gameObject.GetComponent<NavMeshModifier>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<NavMeshModifier>(); |
||||
// } |
||||
// NavMeshModifier mod = obj[i].gameObject.GetComponent<NavMeshModifier>(); |
||||
// mod.overrideArea = true; |
||||
// mod.area = 1; |
||||
// if (!obj[i].gameObject.GetComponent<MeshCollider>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<MeshCollider>(); |
||||
// } |
||||
//} |
||||
//if (obj[i].name.ToLower().Contains("lt"))//楼梯 |
||||
//{ |
||||
// obj[i].gameObject.layer = LayerMask.NameToLayer("SoldierRoad"); |
||||
// if (!obj[i].gameObject.GetComponent<MeshCollider>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<MeshCollider>(); |
||||
// } |
||||
// if (!obj[i].gameObject.GetComponent<PathFindable>()) |
||||
// { |
||||
// obj[i].gameObject.AddComponent<PathFindable>(); |
||||
// } |
||||
} |
||||
} |
||||
} |
||||
[MenuItem("SceneTool/GetNavLayerCarRoad")] |
||||
public static void GetNavLayerCarRoad() |
||||
{ |
||||
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep); |
||||
{ |
||||
for (int i = 0; i < obj.Length; i++) |
||||
{ |
||||
if (obj[i].gameObject.layer == LayerMask.NameToLayer("CarRoad")) |
||||
{ |
||||
// if (!obj[i].gameObject.GetComponent<NavMeshModifier>()) |
||||
{ |
||||
Debug.Log(obj[i].name); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
[MenuItem("SceneTool/ReadCloneTypes")] |
||||
static void ReadCloneTypes() |
||||
{ |
||||
string path = Application.dataPath + "/Floors.txt"; |
||||
string str = File.ReadAllText(path, Encoding.UTF8); |
||||
string[] EnumStrList = str.Split(','); |
||||
//List<CloneObjType> EnmuList = new List<CloneObjType>(); |
||||
//foreach (var item in EnumStrList) |
||||
//{ |
||||
// if (!string.IsNullOrEmpty(item)) |
||||
// { |
||||
// CloneObjType type = (CloneObjType)Enum.Parse(typeof(CloneObjType), item); |
||||
// EnmuList.Add(type); |
||||
// } |
||||
//} |
||||
//GameObject CarRoad = GameObject.Find("FloorNei"); |
||||
//if (!CarRoad.GetComponent<CloneableEnums>()) |
||||
//{ |
||||
// CarRoad.AddComponent<CloneableEnums>(); |
||||
//} |
||||
//var CloneableEnums = CarRoad.GetComponent<CloneableEnums>(); |
||||
//CloneableEnums.CloneableTypes = EnmuList; |
||||
} |
||||
[MenuItem("SceneTool/AddColider")] |
||||
static void AddColider() |
||||
{ |
||||
Transform[] obj = Selection.GetTransforms(SelectionMode.Unfiltered); |
||||
{ |
||||
Debug.Log(obj[0].name); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 64783b6d3a93095469a2c37618e659f0 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 7bd60e6e20366724da8e81e6a3411638 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: fb29b54df4037f546aea659775ff8428 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 7921b8cca4f30e54aba3d57a7f325491 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 34039e9c4b477984391aa32d200a6921 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2 |
||||
guid: cfad5fdf0e7e7ad45bbbc3bd066cb609 |
||||
TrueTypeFontImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 4 |
||||
fontSize: 16 |
||||
forceTextureCase: -2 |
||||
characterSpacing: 0 |
||||
characterPadding: 1 |
||||
includeFontData: 1 |
||||
fontName: Microsoft YaHei |
||||
fontNames: |
||||
- Microsoft YaHei |
||||
fallbackFontReferences: [] |
||||
customCharacters: |
||||
fontRenderingMode: 0 |
||||
ascentCalculationMode: 1 |
||||
useLegacyBoundsCalculation: 0 |
||||
shouldRoundAdvanceValue: 1 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 15df3888a3e3f9e4ba9e8274866879e6 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: e6fd38e09707143499cba53399314e4a |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 727 B |
@ -0,0 +1,110 @@
|
||||
fileFormatVersion: 2 |
||||
guid: d7b944ffdc15fd6488e6b19972f15623 |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
externalObjects: {} |
||||
serializedVersion: 9 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapsPreserveCoverage: 0 |
||||
alphaTestReferenceValue: 0.5 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
streamingMipmaps: 0 |
||||
streamingMipmapsPriority: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
serializedVersion: 2 |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -100 |
||||
wrapU: 1 |
||||
wrapV: 1 |
||||
wrapW: -1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spritePixelsToUnits: 100 |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spriteGenerateFallbackPhysicsShape: 1 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 1 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 8 |
||||
textureShape: 1 |
||||
singleChannelComponent: 0 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- serializedVersion: 2 |
||||
buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
- serializedVersion: 2 |
||||
buildTarget: Standalone |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
- serializedVersion: 2 |
||||
buildTarget: Android |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
physicsShape: [] |
||||
bones: [] |
||||
spriteID: |
||||
vertices: [] |
||||
indices: |
||||
edges: [] |
||||
weights: [] |
||||
spritePackingTag: |
||||
pSDRemoveMatte: 0 |
||||
pSDShowRemoveMatteOption: 0 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: c07f2e49d49444147a1051b8d41eb79c |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 853 B |
@ -0,0 +1,110 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 25d9b074034294a4c81cbcf69bff3c82 |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
externalObjects: {} |
||||
serializedVersion: 9 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapsPreserveCoverage: 0 |
||||
alphaTestReferenceValue: 0.5 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
streamingMipmaps: 0 |
||||
streamingMipmapsPriority: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
serializedVersion: 2 |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -100 |
||||
wrapU: 1 |
||||
wrapV: 1 |
||||
wrapW: -1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spritePixelsToUnits: 100 |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spriteGenerateFallbackPhysicsShape: 1 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 1 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 8 |
||||
textureShape: 1 |
||||
singleChannelComponent: 0 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- serializedVersion: 2 |
||||
buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
- serializedVersion: 2 |
||||
buildTarget: Standalone |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
- serializedVersion: 2 |
||||
buildTarget: Android |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
physicsShape: [] |
||||
bones: [] |
||||
spriteID: |
||||
vertices: [] |
||||
indices: |
||||
edges: [] |
||||
weights: [] |
||||
spritePackingTag: |
||||
pSDRemoveMatte: 0 |
||||
pSDShowRemoveMatteOption: 0 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: a28cdc01612126e418d56d46e94cac46 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,99 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5448f37be88977646bc3013883817301 |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
externalObjects: {} |
||||
serializedVersion: 9 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapsPreserveCoverage: 0 |
||||
alphaTestReferenceValue: 0.5 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
streamingMipmaps: 0 |
||||
streamingMipmapsPriority: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
serializedVersion: 2 |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -100 |
||||
wrapU: 1 |
||||
wrapV: 1 |
||||
wrapW: -1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spritePixelsToUnits: 100 |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spriteGenerateFallbackPhysicsShape: 1 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 1 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 8 |
||||
textureShape: 1 |
||||
singleChannelComponent: 0 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- serializedVersion: 2 |
||||
buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
- serializedVersion: 2 |
||||
buildTarget: Standalone |
||||
maxTextureSize: 2048 |
||||
resizeAlgorithm: 0 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
androidETC2FallbackOverride: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
physicsShape: [] |
||||
bones: [] |
||||
spriteID: |
||||
vertices: [] |
||||
indices: |
||||
edges: [] |
||||
weights: [] |
||||
spritePackingTag: |
||||
pSDRemoveMatte: 0 |
||||
pSDShowRemoveMatteOption: 0 |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 7605906d682fe524aafc39fe0b042aa7 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5549ac296c2cc2d45abec35e8971c3ad |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,553 @@
|
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!1 &1071723951798808 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224827029213624594} |
||||
- component: {fileID: 222280845945885344} |
||||
- component: {fileID: 114819221560437314} |
||||
m_Layer: 5 |
||||
m_Name: HasChild |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 0 |
||||
--- !u!224 &224827029213624594 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1071723951798808} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: |
||||
- {fileID: 224403975457591224} |
||||
m_Father: {fileID: 224851811614464044} |
||||
m_RootOrder: 2 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} |
||||
m_AnchorMin: {x: 1, y: 0.5} |
||||
m_AnchorMax: {x: 1, y: 0.5} |
||||
m_AnchoredPosition: {x: -15, y: 0} |
||||
m_SizeDelta: {x: 20, y: 20} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!222 &222280845945885344 |
||||
CanvasRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1071723951798808} |
||||
m_CullTransparentMesh: 0 |
||||
--- !u!114 &114819221560437314 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1071723951798808} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Material: {fileID: 0} |
||||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
||||
m_RaycastTarget: 1 |
||||
m_OnCullStateChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
||||
m_Sprite: {fileID: 21300000, guid: 5448f37be88977646bc3013883817301, type: 3} |
||||
m_Type: 0 |
||||
m_PreserveAspect: 0 |
||||
m_FillCenter: 1 |
||||
m_FillMethod: 4 |
||||
m_FillAmount: 1 |
||||
m_FillClockwise: 1 |
||||
m_FillOrigin: 0 |
||||
m_UseSpriteMesh: 0 |
||||
--- !u!1 &1462540699490424 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224851811614464044} |
||||
- component: {fileID: 114760225879219738} |
||||
- component: {fileID: 886484853937208961} |
||||
m_Layer: 5 |
||||
m_Name: FloorItem |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!224 &224851811614464044 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1462540699490424} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: |
||||
- {fileID: 224812101392552474} |
||||
- {fileID: 224719521682605098} |
||||
- {fileID: 224827029213624594} |
||||
m_Father: {fileID: 0} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
m_AnchorMin: {x: 0, y: 0} |
||||
m_AnchorMax: {x: 0, y: 0} |
||||
m_AnchoredPosition: {x: 0, y: 0} |
||||
m_SizeDelta: {x: 163, y: 49} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!114 &114760225879219738 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1462540699490424} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Navigation: |
||||
m_Mode: 3 |
||||
m_SelectOnUp: {fileID: 0} |
||||
m_SelectOnDown: {fileID: 0} |
||||
m_SelectOnLeft: {fileID: 0} |
||||
m_SelectOnRight: {fileID: 0} |
||||
m_Transition: 1 |
||||
m_Colors: |
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} |
||||
m_HighlightedColor: {r: 1, g: 1, b: 1, a: 1} |
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} |
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} |
||||
m_ColorMultiplier: 1 |
||||
m_FadeDuration: 0.1 |
||||
m_SpriteState: |
||||
m_HighlightedSprite: {fileID: 0} |
||||
m_PressedSprite: {fileID: 0} |
||||
m_DisabledSprite: {fileID: 0} |
||||
m_AnimationTriggers: |
||||
m_NormalTrigger: Normal |
||||
m_HighlightedTrigger: Highlighted |
||||
m_PressedTrigger: Pressed |
||||
m_DisabledTrigger: Disabled |
||||
m_Interactable: 1 |
||||
m_TargetGraphic: {fileID: 114451063700641064} |
||||
toggleTransition: 1 |
||||
graphic: {fileID: 114657465660630864} |
||||
m_Group: {fileID: 0} |
||||
onValueChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, |
||||
Culture=neutral, PublicKeyToken=null |
||||
m_IsOn: 0 |
||||
--- !u!114 &886484853937208961 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1462540699490424} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: 16a33de889563db4fa6b5f24e003e464, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
buildNum: |
||||
floorNum: 0 |
||||
interlayerNum: 0 |
||||
MyChildFloors: [] |
||||
floorsPanelManager: {fileID: 0} |
||||
MyText: {fileID: 114464141237427192} |
||||
HasChild: {fileID: 1071723951798808} |
||||
MyTarget: {fileID: 0} |
||||
--- !u!1 &1513840504197712 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224637017185402482} |
||||
- component: {fileID: 222472200776745200} |
||||
- component: {fileID: 114657465660630864} |
||||
m_Layer: 5 |
||||
m_Name: Checkmark |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!224 &224637017185402482 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1513840504197712} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: [] |
||||
m_Father: {fileID: 224812101392552474} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
m_AnchorMin: {x: 0.5, y: 0.5} |
||||
m_AnchorMax: {x: 0.5, y: 0.5} |
||||
m_AnchoredPosition: {x: 0.2, y: 0.5} |
||||
m_SizeDelta: {x: 163, y: 49.8} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!222 &222472200776745200 |
||||
CanvasRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1513840504197712} |
||||
m_CullTransparentMesh: 0 |
||||
--- !u!114 &114657465660630864 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1513840504197712} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Material: {fileID: 0} |
||||
m_Color: {r: 0.21604672, g: 0.7701974, b: 0.7941176, a: 1} |
||||
m_RaycastTarget: 1 |
||||
m_OnCullStateChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
||||
m_Sprite: {fileID: 0} |
||||
m_Type: 0 |
||||
m_PreserveAspect: 0 |
||||
m_FillCenter: 1 |
||||
m_FillMethod: 4 |
||||
m_FillAmount: 1 |
||||
m_FillClockwise: 1 |
||||
m_FillOrigin: 0 |
||||
m_UseSpriteMesh: 0 |
||||
--- !u!1 &1565560785055474 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224719521682605098} |
||||
- component: {fileID: 222714370629709676} |
||||
- component: {fileID: 114464141237427192} |
||||
m_Layer: 5 |
||||
m_Name: Label |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!224 &224719521682605098 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1565560785055474} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: [] |
||||
m_Father: {fileID: 224851811614464044} |
||||
m_RootOrder: 1 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
m_AnchorMin: {x: 0, y: 0} |
||||
m_AnchorMax: {x: 1, y: 1} |
||||
m_AnchoredPosition: {x: -10, y: 0} |
||||
m_SizeDelta: {x: -20, y: 0} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!222 &222714370629709676 |
||||
CanvasRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1565560785055474} |
||||
m_CullTransparentMesh: 0 |
||||
--- !u!114 &114464141237427192 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1565560785055474} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Material: {fileID: 0} |
||||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
||||
m_RaycastTarget: 1 |
||||
m_OnCullStateChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
||||
m_FontData: |
||||
m_Font: {fileID: 12800000, guid: cfad5fdf0e7e7ad45bbbc3bd066cb609, type: 3} |
||||
m_FontSize: 22 |
||||
m_FontStyle: 0 |
||||
m_BestFit: 0 |
||||
m_MinSize: 1 |
||||
m_MaxSize: 40 |
||||
m_Alignment: 4 |
||||
m_AlignByGeometry: 0 |
||||
m_RichText: 1 |
||||
m_HorizontalOverflow: 0 |
||||
m_VerticalOverflow: 0 |
||||
m_LineSpacing: 1 |
||||
m_Text: "\u5730\u4E0B\u505C\u8F66\u573A" |
||||
--- !u!1 &1711419534937118 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224812101392552474} |
||||
- component: {fileID: 222551298539894938} |
||||
- component: {fileID: 114451063700641064} |
||||
- component: {fileID: 6151036416438185726} |
||||
- component: {fileID: 2229400231140118989} |
||||
m_Layer: 5 |
||||
m_Name: Background |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!224 &224812101392552474 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1711419534937118} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: |
||||
- {fileID: 224637017185402482} |
||||
m_Father: {fileID: 224851811614464044} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
||||
m_AnchorMin: {x: 0, y: 1} |
||||
m_AnchorMax: {x: 0, y: 1} |
||||
m_AnchoredPosition: {x: 81.500015, y: -24.499996} |
||||
m_SizeDelta: {x: 163, y: 49} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!222 &222551298539894938 |
||||
CanvasRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1711419534937118} |
||||
m_CullTransparentMesh: 0 |
||||
--- !u!114 &114451063700641064 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1711419534937118} |
||||
m_Enabled: 0 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Material: {fileID: 0} |
||||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
||||
m_RaycastTarget: 1 |
||||
m_OnCullStateChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
||||
m_Sprite: {fileID: 0} |
||||
m_Type: 1 |
||||
m_PreserveAspect: 0 |
||||
m_FillCenter: 1 |
||||
m_FillMethod: 4 |
||||
m_FillAmount: 1 |
||||
m_FillClockwise: 1 |
||||
m_FillOrigin: 0 |
||||
m_UseSpriteMesh: 0 |
||||
--- !u!114 &6151036416438185726 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1711419534937118} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Navigation: |
||||
m_Mode: 3 |
||||
m_SelectOnUp: {fileID: 0} |
||||
m_SelectOnDown: {fileID: 0} |
||||
m_SelectOnLeft: {fileID: 0} |
||||
m_SelectOnRight: {fileID: 0} |
||||
m_Transition: 1 |
||||
m_Colors: |
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} |
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} |
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} |
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} |
||||
m_ColorMultiplier: 1 |
||||
m_FadeDuration: 0.1 |
||||
m_SpriteState: |
||||
m_HighlightedSprite: {fileID: 0} |
||||
m_PressedSprite: {fileID: 0} |
||||
m_DisabledSprite: {fileID: 0} |
||||
m_AnimationTriggers: |
||||
m_NormalTrigger: Normal |
||||
m_HighlightedTrigger: Highlighted |
||||
m_PressedTrigger: Pressed |
||||
m_DisabledTrigger: Disabled |
||||
m_Interactable: 1 |
||||
m_TargetGraphic: {fileID: 114451063700641064} |
||||
toggleTransition: 1 |
||||
graphic: {fileID: 0} |
||||
m_Group: {fileID: 0} |
||||
onValueChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, |
||||
Culture=neutral, PublicKeyToken=null |
||||
m_IsOn: 0 |
||||
--- !u!114 &2229400231140118989 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1711419534937118} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: 16a33de889563db4fa6b5f24e003e464, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
buildNum: |
||||
floorNum: 0 |
||||
interlayerNum: 0 |
||||
MyChildFloors: [] |
||||
floorsPanelManager: {fileID: 0} |
||||
MyText: {fileID: 114464141237427192} |
||||
HasChild: {fileID: 0} |
||||
MyTarget: {fileID: 0} |
||||
--- !u!1 &1967893008667110 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
serializedVersion: 6 |
||||
m_Component: |
||||
- component: {fileID: 224403975457591224} |
||||
- component: {fileID: 222804012715825380} |
||||
- component: {fileID: 114092293084417284} |
||||
m_Layer: 5 |
||||
m_Name: BG |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!224 &224403975457591224 |
||||
RectTransform: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1967893008667110} |
||||
m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1.0000972, y: 1.0000972, z: 1.0000963} |
||||
m_Children: [] |
||||
m_Father: {fileID: 224827029213624594} |
||||
m_RootOrder: 0 |
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} |
||||
m_AnchorMin: {x: 0.5, y: 0.5} |
||||
m_AnchorMax: {x: 0.5, y: 0.5} |
||||
m_AnchoredPosition: {x: 0, y: 0.00000035763333} |
||||
m_SizeDelta: {x: 20, y: 20} |
||||
m_Pivot: {x: 0.5, y: 0.5} |
||||
--- !u!222 &222804012715825380 |
||||
CanvasRenderer: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1967893008667110} |
||||
m_CullTransparentMesh: 0 |
||||
--- !u!114 &114092293084417284 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_CorrespondingSourceObject: {fileID: 0} |
||||
m_PrefabInstance: {fileID: 0} |
||||
m_PrefabAsset: {fileID: 0} |
||||
m_GameObject: {fileID: 1967893008667110} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_Material: {fileID: 0} |
||||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
||||
m_RaycastTarget: 1 |
||||
m_OnCullStateChanged: |
||||
m_PersistentCalls: |
||||
m_Calls: [] |
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, |
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
||||
m_Sprite: {fileID: 21300000, guid: 25d9b074034294a4c81cbcf69bff3c82, type: 3} |
||||
m_Type: 0 |
||||
m_PreserveAspect: 0 |
||||
m_FillCenter: 1 |
||||
m_FillMethod: 4 |
||||
m_FillAmount: 1 |
||||
m_FillClockwise: 1 |
||||
m_FillOrigin: 0 |
||||
m_UseSpriteMesh: 0 |
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2 |
||||
guid: bde92561d775dbf429b216264c660af8 |
||||
PrefabImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: cc253f4fec4c9fa43936a7bd1b551512 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 246f3a109d97c9d468c2d4608e341d8f |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: cf465188a2121484b99c70dea38a0d72 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,18 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class AreaNameDic |
||||
{ |
||||
public static Dictionary<string, string> NameDic; |
||||
public static string GetAreaName(string area) |
||||
{ |
||||
if (NameDic==null) |
||||
{ |
||||
NameDic = new Dictionary<string, string>(); |
||||
|
||||
NameDic.Add("LZLD", "绿地置业"); |
||||
} |
||||
return NameDic[area]; |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 01ea5074c4cea644784f4320f0d11ab7 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,15 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class FloorMessage : MonoBehaviour |
||||
{ |
||||
// Use this for initialization |
||||
//使用方法:将脚本挂在场景中每一层的室内结构和室外结构的父对象上 |
||||
//功能:记录建筑每层结构的层信息 |
||||
|
||||
public string buildNum;//楼号 |
||||
public int floorNum;//层号 |
||||
public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 |
||||
public Transform targetTrans;//切楼层时候用来定位的目标点 |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 9d71527466ad15c4f8756733306d3825 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2 |
||||
guid: a90fb1c4427b81849bc9d0fb9a1a0287 |
||||
PrefabImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,327 @@
|
||||
//using AX.MessageSystem; |
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
using UnityEngine.UI; |
||||
|
||||
public class FloorsPanelManager : MonoBehaviour |
||||
{ |
||||
public Transform NeiParent; |
||||
public Transform WaiParent; |
||||
public List<FloorMessage> AllNei;//存储所有楼层内层信息 |
||||
public List<FloorMessage> AllWai;//存储所有楼层的外层信息 |
||||
public Transform FloorBtnsParentPanel;//所有楼层按钮显示的父对象 |
||||
public GameObject FloorBtnPrefab; |
||||
private ToggleGroup ParentToggleGroup; |
||||
private ButtonRecordByAC OutBtn; |
||||
private ButtonRecordByAC InBtn; |
||||
public Scrollbar scrollbar; |
||||
private List<UIFloor> ParentArea = new List<UIFloor>(); |
||||
public FloorData CurrentFloor = new FloorData(); |
||||
public bool FloorsOut = true;//默认展开 |
||||
|
||||
void Awake() |
||||
{ |
||||
LoadBuildingCompleted(); |
||||
//MessageDispatcher.AddListener("LoadBuildingCompleted", LoadBuildingCompleted);//发送场景加载完成消息 |
||||
//gameObject.SetActive(false); |
||||
|
||||
} |
||||
|
||||
//private void RecordFrameFloors(IMessage obj) |
||||
//{ |
||||
// var objectDatas = (List<ObjectData>)obj.Data; |
||||
// UIFloorFrameData data = new UIFloorFrameData(); |
||||
// data.scrollvalue = scrollbar.value; |
||||
// data.isOut = FloorsOut; |
||||
// data.recordFrameType = RecordFrameType.UIFloor; |
||||
// data.time = RecordData.GetRecordTimer(); |
||||
// data.floorNum = CurrentFloor.floorNum; |
||||
// data.buildNum = CurrentFloor.buildNum; |
||||
// data.interlayerNum = CurrentFloor.interlayerNum; |
||||
// data.isOn = CurrentFloor.isOn; |
||||
// objectDatas.Add(DeepCloneTool.DeepClone(data)); |
||||
//} |
||||
|
||||
private void scrollbar_valueChanged(float value) |
||||
{ |
||||
// AddPosRecordData(); |
||||
} |
||||
//private void AddPosRecordData() |
||||
//{ |
||||
// if (RecordData.isRecording()) |
||||
// { |
||||
// var eventData = new UIFloorPosEventData(); |
||||
// eventData.time = RecordData.GetRecordTimer(); |
||||
// eventData.eventType = RecordEventType.FloorsPanelPos; |
||||
// eventData.scrollvalue = scrollbar.value; |
||||
// eventData.isOut = FloorsOut; |
||||
// RecordData.AddRecordEventData(eventData); |
||||
// } |
||||
//} |
||||
private void InBtn_Click() |
||||
{ |
||||
FloorsOut = false; |
||||
// AddPosRecordData(); |
||||
} |
||||
|
||||
private void OutBtn_Click() |
||||
{ |
||||
FloorsOut = true; |
||||
//AddPosRecordData(); |
||||
//foreach (Transform item in FloorBtnsParentPanel) |
||||
//{ |
||||
// if (item.GetComponent<UIFloor>().floorNum == 0) |
||||
// { |
||||
// if (item.GetComponent<Toggle>().isOn) |
||||
// { |
||||
// item.GetComponent<Toggle>().isOn = false; |
||||
// } |
||||
// } |
||||
//} |
||||
} |
||||
//private void OnDestroy() |
||||
//{ |
||||
// MessageDispatcher.RemoveListener("GAMEOBJ_RECORD", RecordFrameFloors); |
||||
// MessageDispatcher.RemoveListener("GAMEOBJ_LOAD", ReplayFrameFloors); |
||||
// MessageDispatcher.RemoveListener("LoadBuildingCompleted", LoadBuildingCompleted);//发送场景加载完成消息 |
||||
//} |
||||
|
||||
private void LoadBuildingCompleted(/*IMessage obj*/) |
||||
{ |
||||
bool ok = Initialization(); |
||||
if (!ok) |
||||
return; |
||||
else |
||||
gameObject.SetActive(true); |
||||
OutBtn = GetComponent<UIMoveManager>().MoveOut; |
||||
InBtn = GetComponent<UIMoveManager>().MoveIn; |
||||
scrollbar = transform.Find("Scroll View/Scrollbar Vertical").GetComponent<Scrollbar>(); |
||||
scrollbar.onValueChanged.AddListener(scrollbar_valueChanged); |
||||
OutBtn.OutInterFaceButton =OutBtn_Click; |
||||
InBtn.OutInterFaceButton=(InBtn_Click); |
||||
//MessageDispatcher.AddListener("ReplayEvent", ReplayEventFloors); |
||||
//MessageDispatcher.AddListener("GAMEOBJ_RECORD", RecordFrameFloors); |
||||
//MessageDispatcher.AddListener("GAMEOBJ_LOAD", ReplayFrameFloors); |
||||
} |
||||
|
||||
//private void ReplayEventFloors(IMessage obj) |
||||
//{ |
||||
// var eventData = (EventData)obj.Data; |
||||
// if (eventData.eventType == RecordEventType.FloorsPanelPos) |
||||
// { |
||||
// UIFloorPosEventData data = (UIFloorPosEventData)obj.Data; |
||||
// if (!data.isOut) |
||||
// { |
||||
// if (FloorsOut) |
||||
// { |
||||
// FloorsOut = data.isOut; |
||||
// InBtn_Click(); |
||||
// GetComponent<UIMoveManager>().MoveIn_Click(); |
||||
// } |
||||
// } |
||||
// else |
||||
// { |
||||
// if (!FloorsOut) |
||||
// { |
||||
// FloorsOut = data.isOut; |
||||
// OutBtn_Click(); |
||||
// GetComponent<UIMoveManager>().MoveOut_Click(); |
||||
// } |
||||
// } |
||||
// scrollbar.value = data.scrollvalue; |
||||
// } |
||||
// else if (eventData.eventType == RecordEventType.UIFloor) |
||||
// { |
||||
// UIFloorEventData eventdata = (UIFloorEventData)obj.Data; |
||||
|
||||
// CurrentFloor.buildNum = eventdata.buildNum; |
||||
// CurrentFloor.floorNum = eventdata.floorNum; |
||||
// CurrentFloor.interlayerNum = eventdata.interlayerNum; |
||||
// CurrentFloor.isOn = eventdata.isOn; |
||||
// Setting(CurrentFloor); |
||||
// } |
||||
//} |
||||
|
||||
//private void ReplayFrameFloors(IMessage obj) |
||||
//{ |
||||
// var objectData = (ObjectData)obj.Data; |
||||
// if (objectData.recordFrameType == RecordFrameType.UIFloor) |
||||
// { |
||||
// UIFloorFrameData framedata = (UIFloorFrameData)obj.Data; |
||||
// if (!framedata.isOut) |
||||
// { |
||||
// if (FloorsOut) |
||||
// { |
||||
// FloorsOut = framedata.isOut; |
||||
// InBtn_Click(); |
||||
// GetComponent<UIMoveManager>().MoveIn_Click(); |
||||
// } |
||||
// } |
||||
// else |
||||
// { |
||||
// if (!FloorsOut) |
||||
// { |
||||
// FloorsOut = framedata.isOut; |
||||
// OutBtn_Click(); |
||||
// GetComponent<UIMoveManager>().MoveOut_Click(); |
||||
// } |
||||
// } |
||||
// scrollbar.value = framedata.scrollvalue; |
||||
|
||||
// CurrentFloor.buildNum = framedata.buildNum; |
||||
// CurrentFloor.floorNum = framedata.floorNum; |
||||
// CurrentFloor.interlayerNum = framedata.interlayerNum; |
||||
// CurrentFloor.isOn = framedata.isOn; |
||||
// Setting(CurrentFloor); |
||||
// } |
||||
//} |
||||
|
||||
private void Setting(FloorData data) |
||||
{ |
||||
if (string.IsNullOrEmpty(data.buildNum) || data.isOn == false) |
||||
{ |
||||
foreach (var item in ParentArea) |
||||
{ |
||||
if (item.GetComponent<Toggle>().isOn) |
||||
{ |
||||
item.GetComponent<Toggle>().isOn = false; |
||||
} |
||||
} |
||||
return; |
||||
} |
||||
UIFloor parent = null; |
||||
foreach (var item in ParentArea) |
||||
{ |
||||
if (item.GetComponent<Toggle>().isOn) |
||||
{ |
||||
item.GetComponent<Toggle>().isOn = false; |
||||
} |
||||
if (item.buildNum == data.buildNum) |
||||
parent = item; |
||||
} |
||||
if (Mathf.Abs(data.floorNum) == 0) |
||||
{ |
||||
parent.GetComponent<Toggle>().isOn = true; |
||||
} |
||||
else |
||||
{ |
||||
parent.GetComponent<Toggle>().isOn = true; |
||||
foreach (var item in parent.MyChildFloors) |
||||
{ |
||||
if (item.GetComponent<UIFloor>().floorNum == data.floorNum |
||||
&& item.GetComponent<UIFloor>().interlayerNum == data.interlayerNum) |
||||
{ |
||||
item.GetComponent<Toggle>().isOn = true; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
private bool Initialization()//初始化数据信息 |
||||
{ |
||||
string path = "LZLD_Scene";// LoadBuilding.GetInstance().building.PrefabName; |
||||
NeiParent = GameObject.Find(path).transform.Find("shinei"); |
||||
WaiParent = GameObject.Find(path).transform.Find("shiwai"); |
||||
if (NeiParent == null && WaiParent == null)//如果没有可以切层的层级目录直接隐藏切楼层菜单 |
||||
{ |
||||
//gameObject.SetActive(false); |
||||
return false; |
||||
} |
||||
if (FloorBtnPrefab == null) |
||||
{ |
||||
FloorBtnPrefab = Resources.Load("UI/FloorItem") as GameObject; |
||||
} |
||||
foreach (Transform item in FloorBtnsParentPanel) |
||||
{ |
||||
Destroy(item.gameObject); |
||||
} |
||||
if (GetComponent<ToggleGroup>()) |
||||
ParentToggleGroup = GetComponent<ToggleGroup>(); |
||||
else |
||||
ParentToggleGroup = gameObject.AddComponent<ToggleGroup>(); |
||||
|
||||
ParentToggleGroup.allowSwitchOff = true; |
||||
|
||||
if (NeiParent) |
||||
{ |
||||
var MaxNumNei = NeiParent.transform.childCount; |
||||
for (int i = 0; i < MaxNumNei; i++) |
||||
{ |
||||
Transform child = NeiParent.GetChild(i); |
||||
GameObject floorBtnParent = Instantiate(FloorBtnPrefab, FloorBtnsParentPanel); |
||||
ToggleGroup floorBtnParentGroup = floorBtnParent.AddComponent<ToggleGroup>(); |
||||
floorBtnParentGroup.allowSwitchOff = true; |
||||
UIFloor floorParent = floorBtnParent.GetComponent<UIFloor>(); |
||||
floorParent.GetComponent<Toggle>().group = ParentToggleGroup; |
||||
floorParent.MyText.text = AreaNameDic.GetAreaName(child.name); |
||||
floorParent.buildNum = child.name; |
||||
floorParent.floorNum = 0; |
||||
floorParent.interlayerNum = 0; |
||||
floorParent.HasChild.SetActive(true); |
||||
floorParent.floorsPanelManager = this; |
||||
floorParent.MyTarget = GetAreaTargetManager.Instance.GetTarget(child.name); |
||||
ParentArea.Add(floorParent); |
||||
var childNum = child.transform.childCount; |
||||
for (int j = 0; j < childNum; j++) |
||||
{ |
||||
Transform childchild = child.GetChild(j); |
||||
GameObject floorBtn = Instantiate(FloorBtnPrefab, FloorBtnsParentPanel); |
||||
UIFloor floor = floorBtn.GetComponent<UIFloor>(); |
||||
floor.GetComponent<Toggle>().group = floorBtnParentGroup; |
||||
|
||||
FloorMessage msg = childchild.GetComponent<FloorMessage>(); |
||||
floor.MyTarget = msg.targetTrans; |
||||
floor.buildNum = msg.buildNum; |
||||
floor.buildNum = msg.buildNum; |
||||
floor.floorNum = msg.floorNum; |
||||
floor.interlayerNum = msg.interlayerNum; |
||||
floor.MyText.text = GetName(floor.floorNum, floor.interlayerNum); |
||||
floor.floorsPanelManager = this; |
||||
floorBtn.gameObject.SetActive(false); |
||||
floorParent.MyChildFloors.Add(floorBtn.transform); |
||||
if (msg != null) |
||||
AllNei.Add(msg); |
||||
} |
||||
} |
||||
} |
||||
if (WaiParent) |
||||
{ |
||||
var MaxNumWai = WaiParent.childCount; |
||||
for (int i = 0; i < MaxNumWai; i++) |
||||
{ |
||||
Transform child = WaiParent.GetChild(i); |
||||
|
||||
var childNum = child.transform.childCount; |
||||
for (int j = 0; j < childNum; j++) |
||||
{ |
||||
Transform childchild = child.GetChild(j); |
||||
FloorMessage msg = childchild.GetComponent<FloorMessage>(); |
||||
if (msg != null) |
||||
AllWai.Add(msg); |
||||
} |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
private string GetName(int floorNum, int interlayerNum) |
||||
{ |
||||
string result = ""; |
||||
if (floorNum < 0) |
||||
{ |
||||
result += "B"; |
||||
floorNum = -floorNum; |
||||
} |
||||
else |
||||
{ |
||||
result += "F"; |
||||
} |
||||
result += floorNum.ToString(); |
||||
if (interlayerNum > 0) |
||||
{ |
||||
result += "M"; |
||||
result += interlayerNum.ToString(); |
||||
} |
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: ab7fa8fd57557494cac4c91d9bc30117 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,38 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class GetAreaTargetManager : MonoBehaviour |
||||
{ |
||||
public Vector3 cameraInitPos = new Vector3();//相机Target初始位置 |
||||
public float initDis;//相机离Target距离的初始值 |
||||
public float init_X;//相机水平旋转初始值 |
||||
public float init_Y;//相机竖直旋转初始值 |
||||
|
||||
public static GetAreaTargetManager Instance; |
||||
[SerializeField] |
||||
private List<Transform> children; |
||||
private void Awake() |
||||
{ |
||||
children = new List<Transform>(); |
||||
foreach (Transform item in transform) |
||||
{ |
||||
children.Add(item); |
||||
} |
||||
Instance = this; |
||||
} |
||||
public Transform GetTarget(string name) |
||||
{ |
||||
Transform result = null; |
||||
foreach (var item in children) |
||||
{ |
||||
if (item.name == name) |
||||
{ |
||||
result = item; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: e01c388cf4175aa49b4973deb437d754 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,161 @@
|
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
//using AX.MessageSystem; |
||||
using UnityEngine.UI; |
||||
using System.Linq; |
||||
//using AX.InputSystem; |
||||
|
||||
public struct FloorData |
||||
{ |
||||
public string buildNum;//楼号 |
||||
public int floorNum;//层号 |
||||
public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 |
||||
public bool isOn; |
||||
} |
||||
public class UIFloor : BaseToggle |
||||
{ |
||||
//楼层切换UI,发送楼层切换消息 |
||||
public string buildNum;//楼号 |
||||
public int floorNum;//层号 |
||||
public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 |
||||
public List<Transform> MyChildFloors = new List<Transform>();//所含楼层 |
||||
public FloorsPanelManager floorsPanelManager; |
||||
public Text MyText; |
||||
public GameObject HasChild;//显示该建筑(区域)下的所有楼层 |
||||
public Transform MyTarget; |
||||
//private CameraManager cameraManager; |
||||
private float FollowCameraDistance = 100f; |
||||
private CameraManager cameraManager; |
||||
private void Awake() |
||||
{ |
||||
cameraManager = GameObject.Find("Main Camera").GetComponent<CameraManager>(); |
||||
//MyTarget = GameObject.Find("FloorPlaneCameraPos").transform.Find("LZLD"); |
||||
//Debug.Log(MyTarget.name); |
||||
} |
||||
public override void RespondFun(bool isOn) |
||||
{ |
||||
var group = GetComponent<Toggle>().group; |
||||
var anyIsOn = group.AnyTogglesOn(); |
||||
var data = new FloorData { buildNum = buildNum, floorNum = floorNum, interlayerNum = interlayerNum, isOn = isOn }; |
||||
if ((anyIsOn && isOn) || !anyIsOn) |
||||
{ |
||||
floorsPanelManager.CurrentFloor = data; |
||||
|
||||
//切层时,发送ESC取消对象选中的消息,取消对象选中,避免误操作。 |
||||
//例如4层有消防员选中且开启了选择目标技能,切到3层,如果不取消消防员的选中,场景中点击左键会触发此消防员的选中目标技能,改变喷水方向 |
||||
//MessageDispatcher.SendMessage("CANCEL_SELECTED_COMMAND", new CmdArgs()); |
||||
|
||||
//MessageDispatcher.SendMessage("FloorNumChanged", data); |
||||
|
||||
//CameraManager.Instance.initialTargetPosY = MyTarget.position.y; |
||||
} |
||||
if (isOn) |
||||
{ |
||||
if (MyChildFloors.Count > 0) |
||||
{ |
||||
foreach (var item in MyChildFloors) |
||||
{ |
||||
item.gameObject.SetActive(true); |
||||
} |
||||
} |
||||
ShowFloor(data); |
||||
} |
||||
else |
||||
{ |
||||
if (MyChildFloors.Count > 0) |
||||
{ |
||||
foreach (var item in MyChildFloors) |
||||
{ |
||||
if (item.GetComponent<Toggle>().isOn) |
||||
{ |
||||
item.GetComponent<Toggle>().isOn = false; |
||||
} |
||||
item.gameObject.SetActive(false); |
||||
} |
||||
} |
||||
HideFloor(); |
||||
} |
||||
} |
||||
|
||||
private void HideFloor() |
||||
{ |
||||
foreach (var item in floorsPanelManager.AllNei) |
||||
{ |
||||
item.gameObject.SetActive(true); |
||||
} |
||||
foreach (var item in floorsPanelManager.AllWai) |
||||
{ |
||||
item.gameObject.SetActive(true); |
||||
} |
||||
} |
||||
|
||||
private void ShowFloor(FloorData data) |
||||
{ |
||||
if (Mathf.Abs(data.floorNum) > 0) |
||||
{ |
||||
foreach (var item in floorsPanelManager.AllWai) |
||||
{ |
||||
if (item.buildNum == data.buildNum && item.floorNum > data.floorNum && Mathf.Abs(item.floorNum) > 0) |
||||
{ |
||||
item.gameObject.SetActive(false); |
||||
} |
||||
|
||||
} |
||||
foreach (var item in floorsPanelManager.AllNei) |
||||
{ |
||||
if (item.buildNum == data.buildNum && item.floorNum > data.floorNum && Mathf.Abs(item.floorNum) > 0) |
||||
{ |
||||
item.gameObject.SetActive(false); |
||||
} |
||||
if (item.buildNum == data.buildNum && item.floorNum == data.floorNum && item.interlayerNum > data.interlayerNum && Mathf.Abs(item.floorNum) > 0) |
||||
{ |
||||
item.gameObject.SetActive(false); |
||||
} |
||||
|
||||
} |
||||
} |
||||
if (MyTarget != null/* && floorNum == 0*/)//镜头拉近 |
||||
{ |
||||
cameraManager.SetCameraView(MyTarget.position, FollowCameraDistance,10,27); |
||||
} |
||||
//if (RecordData.isRecording()) |
||||
//{ |
||||
// AddRecordUIFloor(data); |
||||
//} |
||||
} |
||||
|
||||
//private void AddRecordUIFloor(FloorData data) |
||||
//{ |
||||
// var eventData = new UIFloorEventData(); |
||||
// eventData.time = RecordData.GetRecordTimer(); |
||||
// eventData.eventType = RecordEventType.UIFloor; |
||||
// eventData.buildNum = data.buildNum; |
||||
// eventData.floorNum = data.floorNum; |
||||
// eventData.interlayerNum = data.interlayerNum; |
||||
// eventData.isOn = data.isOn; |
||||
|
||||
// RecordData.AddRecordEventData(eventData); |
||||
//} |
||||
|
||||
//void Start() |
||||
//{ |
||||
// MessageDispatcher.AddListener("ToChangeFloor", changeFloor); |
||||
// //cameraManager = Camera.main.GetComponent<CameraManager>(); |
||||
//} |
||||
|
||||
//public override void OnDestroy() |
||||
//{ |
||||
// base.OnDestroy(); |
||||
// MessageDispatcher.RemoveListener("ToChangeFloor", changeFloor); |
||||
//} |
||||
//private void changeFloor(IMessage msg) |
||||
//{ |
||||
// var data = (FloorData)msg.Data; |
||||
// if (data.buildNum == buildNum && data.floorNum == floorNum && data.interlayerNum == interlayerNum) |
||||
// { |
||||
// GetComponent<Toggle>().isOn = true; |
||||
// } |
||||
//} |
||||
} |
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 16a33de889563db4fa6b5f24e003e464 |
||||
MonoImporter: |
||||
externalObjects: {} |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Loading…
Reference in new issue