diff --git a/u3d-ShanDongVirtualPowerPlant/.vs/u3d-ShanDongVirtualPowerPlant/v17/.suo b/u3d-ShanDongVirtualPowerPlant/.vs/u3d-ShanDongVirtualPowerPlant/v17/.suo index c08e79b..375cb9a 100644 Binary files a/u3d-ShanDongVirtualPowerPlant/.vs/u3d-ShanDongVirtualPowerPlant/v17/.suo and b/u3d-ShanDongVirtualPowerPlant/.vs/u3d-ShanDongVirtualPowerPlant/v17/.suo differ diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials.meta new file mode 100644 index 0000000..d0200e9 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4490e96c0d41159479699e10349bc47b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat new file mode 100644 index 0000000..3ee2973 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat @@ -0,0 +1,120 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: InstructPoint1 + m_Shader: {fileID: 4800000, guid: 989983fab75ea9240a9bf2ea6c938b6f, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: + - ETC1_EXTERNAL_ALPHA + - _ALPHABLEND_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailBump: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainBump: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _BumpScale: 1 + - _Cnt: 100 + - _ColorMask: 15 + - _CullMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _EnableExternalAlpha: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 2 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Ratio: 0.5 + - _Shininess: 0.2 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 5 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Strength: 0.2 + - _UVSec: 0 + - _UseUIAlphaClip: 0 + - _Y: 0 + - _ZWrite: 0 + m_Colors: + - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + - _Specular: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat.meta new file mode 100644 index 0000000..5f8f351 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Materials/InstructPoint1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6c9c9ced31ab0a44a156efc52c31cb1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scenes/Main.unity b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scenes/Main.unity index 2dbe2a0..1fff02b 100644 --- a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scenes/Main.unity +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scenes/Main.unity @@ -347,18 +347,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -7907364852451351285, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &75881466 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75881461} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &75881470 MonoBehaviour: m_ObjectHideFlags: 0 @@ -801,18 +789,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -6686055665587230381, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &192638115 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 192638110} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &192638119 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1560,18 +1536,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 7017237048987047047, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &417525078 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 417525073} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &417525082 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1749,18 +1713,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -4703852509269777894, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &499603009 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 499603004} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &499603013 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2194,18 +2146,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 5525989147181211379, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &829915761 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 829915756} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &829915765 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2759,10 +2699,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 980388496} - - targetCorrespondingSourceObject: {fileID: -1361466933073568924, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 980388497} - targetCorrespondingSourceObject: {fileID: -1361466933073568924, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2771,10 +2707,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 923142886} - - targetCorrespondingSourceObject: {fileID: 7910778940054218449, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 923142887} - targetCorrespondingSourceObject: {fileID: 7910778940054218449, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2783,10 +2715,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1358806015} - - targetCorrespondingSourceObject: {fileID: 4610609447743062514, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1358806016} - targetCorrespondingSourceObject: {fileID: 4610609447743062514, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2795,10 +2723,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1601850660} - - targetCorrespondingSourceObject: {fileID: -6799787392615277207, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1601850661} - targetCorrespondingSourceObject: {fileID: -6799787392615277207, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2807,10 +2731,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 829915760} - - targetCorrespondingSourceObject: {fileID: 5769370776131136003, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 829915761} - targetCorrespondingSourceObject: {fileID: 5769370776131136003, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2819,10 +2739,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1860255669} - - targetCorrespondingSourceObject: {fileID: -2055229545970525513, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1860255670} - targetCorrespondingSourceObject: {fileID: -2055229545970525513, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2831,10 +2747,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 417525077} - - targetCorrespondingSourceObject: {fileID: -5371869996505673154, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 417525078} - targetCorrespondingSourceObject: {fileID: -5371869996505673154, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2843,10 +2755,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1169521372} - - targetCorrespondingSourceObject: {fileID: -6468719678675947214, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1169521373} - targetCorrespondingSourceObject: {fileID: -6468719678675947214, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2855,10 +2763,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1317153132} - - targetCorrespondingSourceObject: {fileID: 3992641925819796629, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1317153133} - targetCorrespondingSourceObject: {fileID: 3992641925819796629, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2867,10 +2771,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1775494364} - - targetCorrespondingSourceObject: {fileID: -7515063161532950506, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1775494365} - targetCorrespondingSourceObject: {fileID: -7515063161532950506, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2879,10 +2779,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1126421822} - - targetCorrespondingSourceObject: {fileID: 5280565503802925455, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1126421823} - targetCorrespondingSourceObject: {fileID: 5280565503802925455, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2891,10 +2787,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1292424842} - - targetCorrespondingSourceObject: {fileID: -2626987921457855494, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1292424843} - targetCorrespondingSourceObject: {fileID: -2626987921457855494, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2903,10 +2795,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 499603008} - - targetCorrespondingSourceObject: {fileID: -1092518748555341945, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 499603009} - targetCorrespondingSourceObject: {fileID: -1092518748555341945, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2915,10 +2803,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 75881465} - - targetCorrespondingSourceObject: {fileID: -6674957004345625353, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 75881466} - targetCorrespondingSourceObject: {fileID: -6674957004345625353, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2927,10 +2811,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 1868312358} - - targetCorrespondingSourceObject: {fileID: 5114964521964791915, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 1868312359} - targetCorrespondingSourceObject: {fileID: 5114964521964791915, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -2939,10 +2819,6 @@ PrefabInstance: type: 3} insertIndex: -1 addedObject: {fileID: 192638114} - - targetCorrespondingSourceObject: {fileID: -4720465257169799636, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, - type: 3} - insertIndex: -1 - addedObject: {fileID: 192638115} - targetCorrespondingSourceObject: {fileID: -4720465257169799636, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} insertIndex: -1 @@ -3062,18 +2938,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 2384613449251143410, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &923142887 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 923142882} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &923142891 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3202,18 +3066,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 4576284387858052071, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &980388497 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980388492} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &980388501 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3416,18 +3268,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -1808381057487496465, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1126421823 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1126421818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1126421827 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4928,6 +4768,15 @@ MonoBehaviour: districtLevelDivisionNumber: 371728 districtLevelName: "\u4E1C\u660E\u53BF" level: 3 + aggregateStation: {fileID: 0} + sprites: + - {fileID: 21300000, guid: 2eb50866b572bee47aeb65c6be923f25, type: 3} + - {fileID: 21300000, guid: dac92aa63a18ff745b0ca6ea512e2068, type: 3} + - {fileID: 21300000, guid: c21d9d7824752fa4bbcc98c6bba7a34c, type: 3} + - {fileID: 21300000, guid: 2dc0f4dfb5918b54ca7d46c3490ea94b, type: 3} + - {fileID: 21300000, guid: a514091bf0801cf46918455168b18fc0, type: 3} + - {fileID: 21300000, guid: 8fd24f44371b45649b3e4c816d61afd4, type: 3} + - {fileID: 21300000, guid: 9142de0592d449c4cb9835603019ba53, type: 3} --- !u!1 &1169521368 stripped GameObject: m_CorrespondingSourceObject: {fileID: -6468719678675947214, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, @@ -4956,18 +4805,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -1052073632546429049, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1169521373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1169521368} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1169521377 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5350,7 +5187,8 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 686787467225068926, guid: 4d666c9d6b0b1974abd575614cb0e5c6, type: 3} m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] @@ -5503,18 +5341,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -363716625156919000, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1292424843 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1292424838} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1292424847 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5637,18 +5463,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 2126323423237972682, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1317153133 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1317153128} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1317153137 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5873,18 +5687,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -2395429499044029987, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1358806016 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1358806011} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1358806020 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6019,6 +5821,78 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -7330527667093665461, guid: b16821147ecd671449621c2d8bfef6ef, type: 3} +--- !u!1001 &1422694239 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1904806910342813020, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_Name + value: AggregateStation (1) + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.x + value: -6.55 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.y + value: 3.94 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.z + value: -8.69 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 5976289726773792637, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + insertIndex: -1 + addedObject: {fileID: 0} + m_SourcePrefab: {fileID: 100100000, guid: ad77f2739706e3c488e719a24ffb293b, type: 3} --- !u!1 &1424993613 stripped GameObject: m_CorrespondingSourceObject: {fileID: 1459619474616934085, guid: b16821147ecd671449621c2d8bfef6ef, @@ -6698,18 +6572,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 8642228918334305833, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1601850661 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1601850656} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1601850665 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6735,6 +6597,8 @@ GameObject: - component: {fileID: 1621379512} - component: {fileID: 1621379513} - component: {fileID: 1621379514} + - component: {fileID: 1621379515} + - component: {fileID: 1621379516} m_Layer: 0 m_Name: Bootstrap m_TagString: Untagged @@ -6792,6 +6656,8 @@ MonoBehaviour: cityParents: {fileID: 951896088} areaParents: {fileID: 4138212277929804823} webAdapter: {fileID: 0} + rayHitTester: {fileID: 1621379515} + lastLand: {fileID: 0} --- !u!114 &1621379514 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6808,7 +6674,39 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] head: Basicc2FiZXI6c2FiZXJfc2VjcmV0 - token: bearereyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiI3OTEyMTQiLCJ1c2VyX25hbWUiOiJhZG1pbiIsInJlYWxfbmFtZSI6ImFkbWluIiwiYXZhdGFyIjoiIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW4iXSwiY2xpZW50X2lkIjoic2FiZXIiLCJyb2xlX25hbWUiOiJhZG1pbiIsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IGJheW1heCIsInBvc3RfaWQiOiIxNzgwNDc5NzgwMTM5ODMxMjk3IiwidXNlcl9pZCI6IjE3ODA0Nzk3ODA2ODkyODUxMjIiLCJyb2xlX2lkIjoiMTc4MDQ3OTc3MjU5ODQ3MjcwNSIsInNjb3BlIjpbImFsbCJdLCJuaWNrX25hbWUiOiJhZG1pbiIsIm9hdXRoX2lkIjoiIiwiZGV0YWlsIjp7InR5cGUiOiJ3ZWIifSwiZXhwIjoxNzE5Mjg1OTE0LCJkZXB0X2lkIjoiMTc4MDQ3OTc4MDAyNjU4NTA5MCIsImp0aSI6IjNmYTUzZmI1LTBlNGMtNDZhZS04ODkxLTRmMTI5NGNhNjI4NyIsImFjY291bnQiOiJhZG1pbiJ9.zMahp8ijl5jNXYnaXOhSrOXYiKh07_U4PXI48TfPuIg + token: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiI3OTEyMTQiLCJ1c2VyX25hbWUiOiJhZG1pbiIsInJlYWxfbmFtZSI6ImFkbWluIiwiYXZhdGFyIjoiIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW4iXSwiY2xpZW50X2lkIjoic2FiZXIiLCJyb2xlX25hbWUiOiJhZG1pbiIsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IGJheW1heCIsInBvc3RfaWQiOiIxNzgwNDc5NzgwMTM5ODMxMjk3IiwidXNlcl9pZCI6IjE3ODA0Nzk3ODA2ODkyODUxMjIiLCJyb2xlX2lkIjoiMTc4MDQ3OTc3MjU5ODQ3MjcwNSIsInNjb3BlIjpbImFsbCJdLCJuaWNrX25hbWUiOiJhZG1pbiIsIm9hdXRoX2lkIjoiIiwiZGV0YWlsIjp7InR5cGUiOiJ3ZWIifSwiZXhwIjoxNzE5MzA0Nzk1LCJkZXB0X2lkIjoiMTc4MDQ3OTc4MDAyNjU4NTA5MCIsImp0aSI6IjdjZWMzODBiLTUwNDAtNDAwYi1iNjI3LTUyNTg3YjZjYmI3MCIsImFjY291bnQiOiJhZG1pbiJ9.HljA25h1zLmHFG1ICkm56tiPpWHh-vQTs3tIR46WmqI +--- !u!114 &1621379515 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621379511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eea3e8dca285e8d459af0d760b61068c, type: 3} + m_Name: + m_EditorClassIdentifier: + _camera: {fileID: 330585545} + debug: 1 +--- !u!114 &1621379516 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621379511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7d0dd96bcd307c449f211fc6ca2a673, type: 3} + m_Name: + m_EditorClassIdentifier: + areaStationData: + code: 0 + success: + data: [] + msg: + distCode: 37 --- !u!1 &1621389858 stripped GameObject: m_CorrespondingSourceObject: {fileID: 1438324003541281471, guid: b16821147ecd671449621c2d8bfef6ef, @@ -7234,18 +7132,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -8941950659133249634, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1775494365 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1775494360} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1775494369 MonoBehaviour: m_ObjectHideFlags: 0 @@ -7448,18 +7334,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 1226433890979495621, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1860255670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1860255665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1860255674 MonoBehaviour: m_ObjectHideFlags: 0 @@ -7542,18 +7416,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 7763966149630490657, guid: 97f3a396ac8b2ca4286621a12e8c1e5a, type: 3} ---- !u!114 &1868312359 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1868312354} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 351a5c40be44956429ec1892d8e0cbc9, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!114 &1868312363 MonoBehaviour: m_ObjectHideFlags: 0 @@ -9135,6 +8997,78 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: -7013985524876191162, guid: b16821147ecd671449621c2d8bfef6ef, type: 3} +--- !u!1001 &66276271572638083 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1904806910342813020, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_Name + value: AggregateStation + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.y + value: 3.94 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalPosition.z + value: -1.56 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2571040290282089906, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 5976289726773792637, guid: ad77f2739706e3c488e719a24ffb293b, + type: 3} + insertIndex: -1 + addedObject: {fileID: 0} + m_SourcePrefab: {fileID: 100100000, guid: ad77f2739706e3c488e719a24ffb293b, type: 3} --- !u!4 &73057916754230481 Transform: m_ObjectHideFlags: 0 @@ -21277,3 +21211,5 @@ SceneRoots: - {fileID: 283865254} - {fileID: 1621379512} - {fileID: 1249285294} + - {fileID: 66276271572638083} + - {fileID: 1422694239} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/AsyncWebReq.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/AsyncWebReq.cs index 2079c80..14589f8 100644 --- a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/AsyncWebReq.cs +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/AsyncWebReq.cs @@ -30,7 +30,7 @@ public static class AsyncWebReq else await getRequest.SendWebRequest(); #if UNITY_EDITOR - Debug.Log("async req : " + getRequest.downloadHandler.text); + //Debug.Log("async req : " + getRequest.downloadHandler.text); #endif T result = JsonConvert.DeserializeObject(getRequest.downloadHandler.text); @@ -65,7 +65,7 @@ public static class AsyncWebReq await postRequest.SendWebRequest(); #if UNITY_EDITOR - Debug.Log("async req : " + postRequest.downloadHandler.text); + //Debug.Log("async req : " + postRequest.downloadHandler.text); #endif T result = JsonConvert.DeserializeObject(postRequest.downloadHandler.text); postRequest.Dispose(); diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Bootstrap.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Bootstrap.cs index fe52df8..bdd533a 100644 --- a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Bootstrap.cs +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Bootstrap.cs @@ -58,9 +58,14 @@ public class Bootstrap : MonoSingleton private Dictionary _fadeTweens = new Dictionary(); - public WebAdapter webAdapter; public Dictionary urlDic = new Dictionary(); + [HideInInspector] + public WebAdapter webAdapter; + [HideInInspector] + public RayHitTester rayHitTester; + public GameObject lastLand; + private void Awake() @@ -71,16 +76,39 @@ public class Bootstrap : MonoSingleton string[] urlInfo = data[i].Split("="); urlDic.Add(urlInfo[0], urlInfo[1]); } + webAdapter = GetComponent(); + rayHitTester = GetComponent(); } void Start() { - webAdapter = GetComponent(); - landMarks = new List { "网络负荷:49.84 kw", "上网负荷:49.84 kw", "削峰负荷:49.84 kw", "填谷负荷:49.84 kw", "发电负荷:49.84 kw" }; + //landMarks = new List { "网络负荷:49.84 kw", "上网负荷:49.84 kw", "削峰负荷:49.84 kw", "填谷负荷:49.84 kw", "发电负荷:49.84 kw" }; landMarkAndInfoCotroller.gameObject.SetActive(false); cameraRt.OnLimitScroll += SwitchLand; } - public bool isLoad = false; + + + private void Update() + { + var hit = rayHitTester.HitTest(); + if (hit.collider != null) + { + landMarks.Clear(); + if (hit.collider.gameObject != lastLand) + { + CloseLandMark(); + } + currentLand = hit.collider.gameObject; + if (currentLand == lastLand) return; + ShowLandMark(currentLand); + } + else + { + CloseLandMark(); + } + } + + /// /// 展示地标 @@ -88,38 +116,42 @@ public class Bootstrap : MonoSingleton /// public async void ShowLandMark(GameObject land) { - if (isLoad) return; - landMarks.Clear(); - string distCode = land.GetComponent().distCode; + + string distCode = currentLand.GetComponent().distCode; + + if (currentLand == null) return; + currentLand.GetComponent().materials = select; + landMarkAndInfoCotroller.gameObject.SetActive(true); + Vector3 worldToScreenPoint = Camera.main.WorldToScreenPoint(new Vector3(currentLand.transform.position.x, currentLand.transform.position.y, currentLand.transform.position.z)); + + lastLand = currentLand; + SwitchLevel(-1); + AreaData areaData = await AsyncWebReq.Get($"{urlDic["地图弹出框"]}{distCode}", webAdapter.head, webAdapter.token); + if (!bool.Parse(areaData.success)) return; - isLoad = true; for (int i = 0; i < areaData.data.items.Count; i++) { string info = $"{areaData.data.items[i].label}:{areaData.data.items[i].value}{areaData.data.items[i].unit}"; landMarks.Add(info); } - - currentLand = land; - currentLand.GetComponent().materials = select; - landMarkAndInfoCotroller.gameObject.SetActive(true); - Vector3 worldToScreenPoint = Camera.main.WorldToScreenPoint(new Vector3(currentLand.transform.position.x, currentLand.transform.position.y, currentLand.transform.position.z)); landMarkAndInfoCotroller.GetComponent().position = new Vector3(worldToScreenPoint.x, worldToScreenPoint.y, 0); - landMarkAndInfoCotroller.SetMarksInfo(currentLand.name, landMarks); - SwitchLevel(-1); + if (currentLand != null) + landMarkAndInfoCotroller.SetMarksInfo(currentLand.name, landMarks); } /// /// 关闭地标 /// public void CloseLandMark() { - isLoad = false; + landMarkAndInfoCotroller.gameObject.SetActive(false); - if (currentLand != null) + if (lastLand != null) { - currentLand.GetComponent().materials = mat; - currentLand = null; + lastLand.GetComponent().materials = mat; + lastLand = null; } + currentLand = null; SwitchLevel(currentLevel); } diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components.meta new file mode 100644 index 0000000..cefaf0c --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c82969bf5e8a4b94d9f42734d863738c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs new file mode 100644 index 0000000..15fd46b --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using TMPro; + +public class AggregateStation : MonoBehaviour +{ + + public SpriteRenderer instruct; + public TMP_Text instructInfo; + public void SetInfo(Sprite stationIcon, string num) + { + instruct.sprite = stationIcon; + instructInfo.text = num; + } +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs.meta new file mode 100644 index 0000000..fc7e6cc --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/AggregateStation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: deac56328b1a8f14783a00a90bac4bf3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/CityInfo.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/CityInfo.cs similarity index 80% rename from u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/CityInfo.cs rename to u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/CityInfo.cs index ff71309..b51d0ca 100644 --- a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/CityInfo.cs +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/CityInfo.cs @@ -6,4 +6,13 @@ public class CityInfo : MonoBehaviour { public string distCode; public string cityName; + + private void Start() + { + + } + + } + + diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/CityInfo.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/CityInfo.cs.meta similarity index 100% rename from u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/CityInfo.cs.meta rename to u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/CityInfo.cs.meta diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs new file mode 100644 index 0000000..fbc75fb --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs @@ -0,0 +1,36 @@ +using UnityEngine; +//============================================================ +//鏀寔涓枃锛屾枃浠朵娇鐢║TF-8缂栫爜 +//@author Adam +//@create 20221005 +//@company Umawerse +// +//@description: +//============================================================ + + public class DistanceAdjuster : MonoBehaviour + { + public float minDistance = 100; + public float maxDistance = 300; + public float minScale = 1; + public float maxScale = 1; + private Camera _camera; + // Use this for initialization + private void Start () { + _camera = Camera.main; + } + + private void Update() + { + var d = Vector3.Distance(transform.position, _camera.transform.position); + var s = Remap(d, minDistance, maxDistance, minScale, maxScale); + s= Mathf.Max(s, minScale); + s= Mathf.Min(s, maxScale); + transform.localScale = Vector3.one * s; + } + + private float Remap(float value, float inMin, float inMax, float outMin, float outMax) + { + return (value - inMin) / (inMax - inMin) * (outMax - outMin) + outMin; + } + } diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs.meta new file mode 100644 index 0000000..d79dd96 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/DistanceAdjuster.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58c77e77f4c79fe44872c00e6ee32ab4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/LandMarksAndInfoController.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LandMarksAndInfoController.cs similarity index 100% rename from u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/LandMarksAndInfoController.cs rename to u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LandMarksAndInfoController.cs diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/LandMarksAndInfoController.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LandMarksAndInfoController.cs.meta similarity index 100% rename from u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/LandMarksAndInfoController.cs.meta rename to u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LandMarksAndInfoController.cs.meta diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs new file mode 100644 index 0000000..338ab96 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +public class LookAt : MonoBehaviour +{ + private Camera _mainCam; + private bool revert; + public bool isLockY = false; + public bool isLockXZ = false; + // Start is called before the first frame update + void Start() + { + _mainCam = Camera.main; + revert = true; + } + + // Update is called once per frame + void Update() + { + if (!_mainCam) return; + var dir = transform.position - _mainCam.transform.position; + var up = Vector3.up; + if (isLockY) + { + dir.y = 0; + } + else if (isLockXZ) + { + up.Set(dir.x, 0, dir.z); + dir = Vector3.ProjectOnPlane(dir, up); + + } + transform.LookAt(transform.position + dir, up); + } +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs.meta new file mode 100644 index 0000000..9e4988a --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Components/LookAt.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2157c86bfc66fca43a9eb7c8e5661a1e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs new file mode 100644 index 0000000..c4ba0ce --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +/// +/// 区域资源站点信息 +/// +[Serializable] +public class AreaStationData +{ + /// + /// + /// + public int code ; + /// + /// + /// + public string success ; + /// + /// + /// + public List data ; + /// + /// 操作成功 + /// + public string msg ; +} +[Serializable] +public class ScreenTopStatistics +{ + /// + ///行政区域编码 + /// + public string distCode ; + /// + /// 代理用户 + /// + public string agentCons ; + /// + /// 微电网 + /// + public string microGrid ; + /// + /// 储能电站 + /// + public string energyStation ; + /// + /// 光伏电站 + /// + public string phoStation ; + /// + /// 风电站 + /// + public string windStation ; + /// + /// 楼宇空调 + /// + public string airCondition ; +} +[Serializable] +public class DataItem +{ + /// + /// + /// + public string distCode ; + /// + /// 济南市 + /// + public string disName ; + /// + /// 用户资源统计 + /// + public ScreenTopStatistics screenTopStatistics ; +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs.meta new file mode 100644 index 0000000..7721ced --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/Data/AreaStationData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f2ab35c325cf6d14b90952d051dd59db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs new file mode 100644 index 0000000..d30c97b --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class DataController : MonoSingleton +{ + public AreaStationData areaStationData = new AreaStationData(); + public string distCode = "37"; + // Start is called before the first frame update + private async void Start() + { + string url = Bootstrap.Instance.urlDic["地图信息汇总"]; + areaStationData = await AsyncWebReq.Get(url + distCode, Bootstrap.Instance.webAdapter.head, Bootstrap.Instance.webAdapter.token); + } + + public ScreenTopStatistics GetStationsByDistCode(string distCode) + { + DataItem sts = areaStationData.data.Find(s => s.distCode == distCode); + return sts.screenTopStatistics; + } +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs.meta new file mode 100644 index 0000000..423d956 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/DataController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c7d0dd96bcd307c449f211fc6ca2a673 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs new file mode 100644 index 0000000..d3fdfba --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs @@ -0,0 +1,12 @@ +锘縰sing UnityEngine; +using System.Collections; + + public abstract class HitTester:MonoBehaviour + { + public abstract RaycastHit HitTest(); + public abstract void SetLayerMask(int layerMask = Physics.DefaultRaycastLayers); + public abstract RaycastHit HitTest(Vector3 point, bool worldPosition); + public abstract Ray GetRay(); + public abstract void SetCamera(Camera cam); + public abstract Camera GetCamera(); + } diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs.meta new file mode 100644 index 0000000..97b7667 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/HitTester.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82d0c0f4f4425684184827d8dd6030b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs new file mode 100644 index 0000000..8b107a6 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs @@ -0,0 +1,73 @@ +using UnityEngine; +using System.Collections; +using System; + + + public class RayHitTester : HitTester + { + [SerializeField] + private Camera _camera; + public bool debug; + private RaycastHit _result = new RaycastHit(); + private Ray _ray; + private LayerMask _layerMask = Physics.DefaultRaycastLayers; + public override void SetCamera(Camera cam) + { + _camera = cam; + } + public override Camera GetCamera() + { + return _camera; + } + public override Ray GetRay() + { + return _ray; + } + public override RaycastHit HitTest() + { + return _result; + } + public override void SetLayerMask(int layerMask = Physics.DefaultRaycastLayers) + { + _layerMask = layerMask; + } + public override RaycastHit HitTest(Vector3 position,bool worldPosition) + { + RaycastHit result = new RaycastHit(); + if (worldPosition == true) position = _camera.WorldToScreenPoint(position); + Raycast(position, out result); + return result; + } + private void Update() + { + _ray = Raycast(Input.mousePosition, out _result); + } + private Ray Raycast(Vector3 position, out RaycastHit result) + { + if (_camera == null) _camera = Camera.main; + Ray ray = _camera.ScreenPointToRay(position); + // regular 3D raycast + bool hit = Physics.Raycast(ray, out result, Mathf.Infinity,_layerMask); + //#if UNITY_EDITOR + // vizualise ray + if (debug==true) + { + //lineRenderer.SetPosition(0, ray.origin+new Vector3(0.0f,-0.3f)); + if (hit) + { + Vector3 hitPos = result.point; + + Debug.DrawLine(ray.origin, hitPos, Color.green, 0.5f); + //lineRenderer.SetPosition(1, hitPos); + } + else + { + //Debug.Log("Raycase " +debug+" -> "+ ray); + Debug.DrawLine(ray.origin, ray.origin + ray.direction * 9999.0f, Color.red, 0.5f); + //lineRenderer.SetPosition(1, ray.origin + ray.direction * 50); + } + } + //#endif + return ray; + } + } diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs.meta new file mode 100644 index 0000000..09ca77a --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/RayHitTester.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eea3e8dca285e8d459af0d760b61068c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/TEst.cs b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/TEst.cs index b159171..ec1fc3d 100644 --- a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/TEst.cs +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Scripts/TEst.cs @@ -7,7 +7,9 @@ public class TEst : MonoBehaviour { public CityExcelData manager = new CityExcelData(); - + public AggregateStation aggregateStation; + public List sprites = new List(); + public List gameObjects = new List(); [ContextMenu("GetInfo")] public void CreateItemAsset() { @@ -26,4 +28,27 @@ public class TEst : MonoBehaviour } } + [ContextMenu("CreateStation")] + public void CreateStation() + { + for (int i = 0; i < gameObjects.Count; i++) + { + DestroyImmediate(gameObjects[i]); + } + gameObjects.Clear(); + for (int i = 0; i < transform.childCount; i++) + { + Transform t = transform.GetChild(i); + + for (int j = 0; j < sprites.Count; j++) + { + AggregateStation _aggregateStation = Instantiate(aggregateStation, t); + _aggregateStation.transform.localPosition = new Vector3( Random.Range(-0.5f, 0.5f), Random.Range(-0.5f, 0.5f), 2f); + _aggregateStation.transform.localEulerAngles = new Vector3(90, 0, 0); + _aggregateStation.SetInfo(sprites[j], "0"); + gameObjects.Add(_aggregateStation.gameObject); + } + + } + } } diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader.meta new file mode 100644 index 0000000..4eec681 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b25d80bdc80bcd4d8ebbfab374f89c6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader new file mode 100644 index 0000000..f728ac4 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader @@ -0,0 +1,19 @@ +Shader "Custom/3D Text Shader" { + Properties { + _MainTex ("Font Texture", 2D) = "white" {} + _Color ("Text Color", Color) = (1,1,1,1) + } + + + SubShader { + Tags{ "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Lighting Off Cull Off ZWrite On Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + Pass { + Color [_Color] + SetTexture [_MainTex] { + combine primary, texture * primary + } + } + } +} \ No newline at end of file diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader.meta new file mode 100644 index 0000000..602ea59 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/3DTextShader.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d2fabe0493cdf8d4bb3debffe4046004 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader new file mode 100644 index 0000000..e529bfb --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader @@ -0,0 +1,63 @@ +Shader "Umawerse/BorderCircle" +{ + Properties + { + _Color("Color",Color)=(0.5,0.5,0.5,1) + _Thickness("Thickness",Range(0,1)) = 0.1 + _Border("Border",Color)=(1,1,1,1) + [Enum(UnityEngine.Rendering.CompareFunction)]_ZTest("ZTest",int) = 0 + } + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Overlay" "PreviewType"="Plane"} + ZTest[_ZTest] + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + fixed4 _Color; + fixed _Thickness; + fixed4 _Border; + + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + // sample the texture + fixed4 col = _Color; + const fixed r = 0.5; + const fixed ir = r*(1-_Thickness); + const fixed x = i.uv.x - r; + const fixed y = i.uv.y - r; + + if(x*x+y*y>ir*ir) col = _Border; + clip(r*r-x*x-y*y); + return col; + } + ENDCG + } + } +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader.meta new file mode 100644 index 0000000..167242e --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/BorderCircle.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b2c622e4aa97c480b8bd519d2eecda85 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader new file mode 100644 index 0000000..08360de --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader @@ -0,0 +1,62 @@ +Shader "Custom/CirculationBg" +{ + Properties + { + _MainTex("Texture", 2D) = "white" {} + _ScrollXSpeed("X Scroll Speed",Range(-100,100)) = 0 + _ScrollYSpeed("Y Scroll Speed",Range(-100,100)) = 0 + } + SubShader + { + Tags { "RenderType" = "Opaque" } + LOD 100 + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + float _ScrollXSpeed; + float _ScrollYSpeed; + + v2f vert(appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + float2 uv = i.uv; + + float xNew = frac(_ScrollXSpeed * _Time); //frac是取小数的函数 如1.23 取出来是 0.23 + float yNew = frac(_ScrollYSpeed * _Time); + uv += float2(xNew,yNew); + + float4 col = tex2D(_MainTex, uv); + return col; + } + ENDCG + } + } + Fallback "VertexLit" +} \ No newline at end of file diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader.meta new file mode 100644 index 0000000..6a765b6 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/CirculationBg.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 47c5d4f19ca965241abf99ed7eb6ec2a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader new file mode 100644 index 0000000..7d9e2f9 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader @@ -0,0 +1,88 @@ +Shader "Custom/UI/DotLine" +{ + Properties + { + _Color ("Tint", Color) = (1,1,1,1) + _Cnt ("Cnt", float) = 100 + _Ratio ("Ratio", Range(0, 1.0)) = 0.5 + [Toggle(VERTICAL)] _Y ("Y锛", float) = 0 + } + + SubShader + { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + "PreviewType"="Plane" + "CanUseSpriteAtlas"="True" + } + + Cull Off + Lighting Off + ZWrite Off + ZTest [unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + + Pass + { + Name "Default" + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 2.0 + #pragma multi_compile __ VERTICAL + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + + struct appdata_t + { + float4 vertex : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : SV_POSITION; + float2 texcoord : TEXCOORD0; + }; + + fixed4 _Color; + float _Cnt; + fixed _Ratio; + + v2f vert(appdata_t v) + { + v2f OUT; + OUT.vertex = UnityObjectToClipPos(v.vertex); + OUT.texcoord = v.texcoord; + return OUT; + } + + fixed4 frag(v2f IN) : SV_Target + { + fixed4 color = _Color; + + #if VERTICAL + + float y = IN.texcoord.y * _Cnt; + int intY = int(y); + color.a *= step(y-intY, _Ratio); + + #else + + float x = IN.texcoord.x * _Cnt; + int intX = int(x); + color.a *= step(x-intX, _Ratio); + + #endif + + color.rgb *= color.a; + return color; + } + ENDCG + } + } +} \ No newline at end of file diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader.meta new file mode 100644 index 0000000..89f0e4b --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/DotLine.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 33d704979108a5a40bb239bf4777c76b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader new file mode 100644 index 0000000..8b82ece --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader @@ -0,0 +1,27 @@ +锘縎hader "Custom/Line" +{ + + Properties + { + _MainTex("Base (RGB)", 2D) = "white" {} + _Cutoff("Alpha Cutoff", Range(0, 1)) = 0.1 + _Color("Color",Color) = (0,0,0,0) + } + SubShader + { + Pass + { + Material + { + Diffuse[_Color] + Ambient[_Color] + } + Lighting On + AlphaTest GEqual[_Cutoff] + + SetTexture[_MainTex] {} + SetTexture[_MainTex] {combine texture + primary DOUBLE, previous} + } + } + FallBack "Diffuse" +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader.meta new file mode 100644 index 0000000..cfc1f42 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Line.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5148528e2aacec944b82a52084afd803 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader new file mode 100644 index 0000000..fb0ec24 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader @@ -0,0 +1,97 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Custom/OverlayImg" +{ + Properties + { + [PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {} + _Color("Tint", Color) = (1,1,1,1) + + //MASK SUPPORT ADD + _StencilComp("Stencil Comparison", Float) = 8 + _Stencil("Stencil ID", Float) = 0 + _StencilOp("Stencil Operation", Float) = 0 + _StencilWriteMask("Stencil Write Mask", Float) = 255 + _StencilReadMask("Stencil Read Mask", Float) = 255 + _ColorMask("Color Mask", Float) = 15 + //MASK SUPPORT END + } + + SubShader + { + Tags + { + "Queue" = "Overlay" + "IgnoreProjector" = "True" + "RenderType" = "Transparent" + "PreviewType" = "Plane" + "CanUseSpriteAtlas" = "True" + } + + //MASK SUPPORT ADD + Stencil + { + Ref[_Stencil] + Comp[_StencilComp] + Pass[_StencilOp] + ReadMask[_StencilReadMask] + WriteMask[_StencilWriteMask] + } + + ColorMask[_ColorMask] + //MASK SUPPORT END + + Cull Off + Lighting Off + ZWrite Off + ZTest Always + Fog{ Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + //ColorMask[_ColorMask] + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata_t + { + float4 vertex : POSITION; + float4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + half2 texcoord : TEXCOORD0; + }; + + fixed4 _Color; + + v2f vert(appdata_t IN) + { + v2f OUT; + OUT.vertex = UnityObjectToClipPos(IN.vertex); + OUT.texcoord = IN.texcoord; + #ifdef UNITY_HALF_TEXEL_OFFSET + OUT.vertex.xy += (_ScreenParams.zw - 1.0) * float2(-1,1); + #endif + OUT.color = IN.color * _Color; + return OUT; + } + + sampler2D _MainTex; + + fixed4 frag(v2f IN) : SV_Target + { + half4 color = tex2D(_MainTex, IN.texcoord) * IN.color; + return color; + } + ENDCG + } + } +} \ No newline at end of file diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader.meta new file mode 100644 index 0000000..177a542 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/OverlayImg.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 989983fab75ea9240a9bf2ea6c938b6f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader new file mode 100644 index 0000000..3043bbe --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader @@ -0,0 +1,44 @@ +Shader "Custom/Pipe" +{ + Properties + { + _Cutoff("Mask Clip Value", Float) = 0.5 + _Speed("Speed", Range(0 , 150)) = 0.01 + _MainTex("MainTex", 2D) = "white" {} + _Number("Number", Range(0 , 100)) = 3.082893 + [HideInInspector] _texcoord("", 2D) = "white" {} + [HideInInspector] __dirty("", Int) = 1 + } + + SubShader + { + Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" "IgnoreProjector" = "True" } + Cull Back + CGPROGRAM + #include "UnityShaderVariables.cginc" + #pragma target 3.0 + #pragma surface surf Standard keepalpha addshadow fullforwardshadows + struct Input + { + float2 uv_texcoord; + }; + + uniform sampler2D _MainTex; + uniform float _Speed; + uniform float _Number; + uniform float _Cutoff = 0.5; + + void surf(Input i , inout SurfaceOutputStandard o) + { + float2 temp_cast_0 = (_Number).xx; + float2 uv_TexCoord158 = i.uv_texcoord * temp_cast_0; + float4 tex2DNode174 = tex2D(_MainTex, ((_Speed * _Time) + uv_TexCoord158.x).xy); + o.Albedo = tex2DNode174.rgb; + o.Alpha = 1; + clip(tex2DNode174.a - _Cutoff); + } + + ENDCG + } + Fallback "Diffuse" +} diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader.meta b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader.meta new file mode 100644 index 0000000..1868db4 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Pipe.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e433e2ae074cd2143a619d8114ba179f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Polygon.shader b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Polygon.shader new file mode 100644 index 0000000..db5b2d7 --- /dev/null +++ b/u3d-ShanDongVirtualPowerPlant/Assets/Adam/Shader/Polygon.shader @@ -0,0 +1,144 @@ +锘// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "Unlit/polygon" +{ + Properties + { + //瀹氫箟鍩烘湰灞炴э紝鍙互浠庣紪杈戝櫒閲岄潰杩涜璁剧疆鐨勫彉閲 + // _MainTex ("Texture", 2D) = "white" {} + } + + CGINCLUDE + //浠庡簲鐢ㄧ▼搴忎紶鍏ラ《鐐瑰嚱鏁扮殑鏁版嵁缁撴瀯瀹氫箟 + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + //浠庨《鐐瑰嚱鏁颁紶鍏ョ墖娈靛嚱鏁扮殑鏁版嵁缁撴瀯瀹氫箟 + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + //瀹氫箟璐村浘鍙橀噺 + sampler2D _MainTex; + // float4 _MainTex_ST; + + //瀹氫箟涓庤剼鏈繘琛岄氫俊鐨勫彉閲 + vector Value[99]; + int PointNum =0; + + //璁$畻涓ょ偣闂寸殑璺濈鐨勫嚱鏁 + float Dis(float4 v1,float4 v2) + { + return sqrt(pow((v1.x-v2.x),2)+pow((v1.y-v2.y),2)); + } + + //缁樺埗绾挎 + bool DrawLineSegment(float4 p1, float4 p2, float lineWidth,v2f i) + { + float4 center = float4((p1.x+p2.x)/2,(p1.y+p2.y)/2,0,0); + //璁$畻鐐瑰埌鐩寸嚎鐨勮窛绂 + float d = abs((p2.y-p1.y)*i.vertex.x + (p1.x - p2.x)*i.vertex.y +p2.x*p1.y -p2.y*p1.x )/sqrt(pow(p2.y-p1.y,2) + pow(p1.x-p2.x,2)); + //灏忎簬鎴栬呯瓑浜庣嚎瀹界殑涓鍗婃椂锛屽睘浜庣洿绾胯寖鍥 + float lineLength = sqrt(pow(p1.x-p2.x,2)+pow(p1.y-p2.y,2)); + if(d<=lineWidth/2 && Dis(i.vertex,center)testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) + c = !c; + } + return c; + } + + v2f vert (appdata v) + { + v2f o; + //灏嗙墿浣撻《鐐逛粠妯″瀷绌洪棿鎹㈠埌鎽勫儚鏈哄壀瑁佺┖闂达紝涔熷彲閲囩敤绠鍐欐柟寮忊斺攐.vertex = UnityObjectToClipPos(v.vertex); + /*o.vertex = UnityObjectToClipPos(v.vertex); */ + o.vertex = v.vertex; + //2D UV鍧愭爣鍙樻崲,涔熷彲浠ラ噰鐢ㄧ畝鍐欐柟寮忊斺攐.uv = TRANSFORM_TEX(v.uv, _MainTex); + //o.uv = v.uv.xy * _MainTex_ST.xy + _MainTex_ST.zw; + return o; + } + fixed4 frag (v2f i) : SV_Target + { + + //缁樺埗澶氳竟褰㈤《鐐 + //for(int j=0;j