添加退出APP功能,安徽宿州砀山古城商业街苏州场景

This commit is contained in:
ZYT
2025-12-06 11:41:20 +08:00
parent c572c17727
commit 8a20cc9c7a
61 changed files with 30183 additions and 6 deletions

View File

@@ -0,0 +1,351 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &616688178513851202
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 932119738183159764}
- component: {fileID: 7326694442604138514}
- component: {fileID: 2147988866276981564}
- component: {fileID: 4856538540538549100}
m_Layer: 0
m_Name: Cube (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &932119738183159764
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 616688178513851202}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1.6103896}
m_LocalScale: {x: 1, y: 1, z: 1.5974027}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4666156273386392709}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7326694442604138514
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 616688178513851202}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &2147988866276981564
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 616688178513851202}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &4856538540538549100
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 616688178513851202}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &724252726936952539
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3714827713392600281}
m_Layer: 0
m_Name: "\u5B89\u5FBD\u82CF\u5DDE"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3714827713392600281
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 724252726936952539}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: -3.704, y: -0.5, z: 1.85}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4666156273386392709}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!1 &7975283993973379945
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 72832042947355210}
- component: {fileID: 8159567502049976636}
- component: {fileID: 7428044850780860213}
- component: {fileID: 2847486358990787404}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &72832042947355210
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7975283993973379945}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.13513514, y: 0, z: 0.65584415}
m_LocalScale: {x: 0.7297298, y: 1, z: 0.31168833}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4666156273386392709}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8159567502049976636
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7975283993973379945}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7428044850780860213
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7975283993973379945}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &2847486358990787404
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7975283993973379945}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8134991575396817661
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4666156273386392709}
- component: {fileID: 6866317245644399425}
- component: {fileID: 1831803231171388633}
- component: {fileID: 6043315326034838932}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4666156273386392709
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8134991575396817661}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3.7, y: 1, z: 3.85}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 72832042947355210}
- {fileID: 932119738183159764}
m_Father: {fileID: 3714827713392600281}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6866317245644399425
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8134991575396817661}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1831803231171388633
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8134991575396817661}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &6043315326034838932
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8134991575396817661}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 23d92bcafd23cd84c80d578f742aa637
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Magic_Spline.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9f9f504961e7ed145a91e5c5e1d358da
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d1f4990bafe43984db88faceb7c0cb17
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: e6f1be8867d4eb246825875f8ab19c1e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,7 +8,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<data android:scheme="picoapp" android:host="launch" android:path="/com.pineappletech.futuremen.chongqingyuzhonghongyadongxiakexingshiwan"/>
<data android:scheme="picoapp" android:host="launch" android:path="/com.pineappletech.futuremen.anhuisuzhouyueshanguchengshangyejie2"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

View File

@@ -154570,7 +154570,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3, y: 3, z: 3}
m_LocalScale: {x: 5, y: 5, z: 5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 3274838951918742544}

View File

@@ -0,0 +1 @@
{"EnemyData":{"Columns":["ID","EnemyId","Name","Name_CN","Atk","Speed","Rate","Hp","EnemyDesc","DescInfo"],"Values":[[ 0, 1,"EnemyTa","\u5916\u661F\u80FD\u6E90\u5854", 0, 3, 0, 2000,"\u5916\u661F\u519B\u56E2\u7684\u5E38\u89C4\u4F5C\u6218\u5175\u79CD\uFF0C\u914D\u5907\u6709\u5E38\u89C4\u706B\u529B\u6B65\u67AA\u4F5C\u4E3A\u4F5C\u6218\u5175\u5668\u3002","(1, 2, 2, 2)"],[ 1, 2,"Enemy1","\u5916\u661F\u67AA\u624B", 100, 3, 0, 800,"\u5916\u661F\u519B\u56E2\u7684\u5E38\u89C4\u4F5C\u6218\u5175\u79CD\uFF0C\u914D\u5907\u6709\u5E38\u89C4\u706B\u529B\u6B65\u67AA\u4F5C\u4E3A\u4F5C\u6218\u5175\u5668\u3002","(1, 2, 2, 2)"],[ 2, 3,"DropShip","\u5916\u661F\u98DE\u8239", 100, 3, 1.15, 30000,"\u5916\u661F\u519B\u56E2\u7684\u5E38\u89C4\u4F5C\u6218\u5175\u79CD\uFF0C\u914D\u5907\u6709\u5E38\u89C4\u706B\u529B\u6B65\u67AA\u4F5C\u4E3A\u4F5C\u6218\u5175\u5668\u3002","(1, 2, 2, 2)"],[ 3, 4,"Leviathan","\u5916\u661F\u5229\u7EF4\u5766", 25, 5,0.8, 30000,"\u5168\u8EAB\u7531\u8F7B\u578B\u88C5\u7532\u5236\u9020\u800C\u6210\u7684\u4F4E\u6B66\u88C5\u4FA6\u5BDF\u578B\u673A\u5668\u4EBA\uFF0C\u884C\u52A8\u9AD8\u901F\u800C\u7075\u654F\uFF0C\u4F46\u662F\u9632\u62A4\u8F83\u5DEE\u3002","(1, 1, 1, 4)"],[ 4, 5,"Enemy2","\u98DE\u884C\u54E8\u5175", 40, 3,0.8, 1000,"\u52A8\u7269\u5F62\u6001\u7684\u517D\u578B\u5175\u79CD,\u8D34\u5730\u722C\u884C\u901F\u5EA6\u5F88\u5FEB,\u7528\u950B\u5229\u7684\u524D\u817F\u653B\u51FB.\u4E0D\u8981\u88AB\u4ED6\u4EEC\u5305\u56F4,\u5426\u5219\u4F1A\u906D\u53D7\u5DE8\u5927\u4F24\u5BB3.","(2, 2, 1, 3)"],[ 5, 6,"MachineDragon","\u673A\u68B0\u9738\u738B\u9F99", 150, 4,0.8, 40000,"\u94A2\u7259\u62A4\u536B\u7684\u5347\u7EA7\u578B\u53F7,\u66F4\u5927\u7684\u4F53\u578B\u4F1A\u5E26\u6765\u66F4\u5927\u7684\u4F24\u5BB3.","(3, 6, 6, 5)"],[ 6, 7,"Enemy3","\u5229\u722A\u5148\u950B", 10, 0,0.016, 1000,"\u5168\u526F\u6B66\u88C5\u7684\u91CD\u578B\u673A\u7532\uFF0C\u884C\u52A8\u7F13\u6162\uFF0C\u4F46\u9632\u5FA1\u6781\u9AD8\uFF0C\u706B\u529B\u5F3A\u52B2\uFF0C\u5C3D\u91CF\u4E0D\u8981\u66B4\u9732\u5728\u4ED6\u7684\u6B63\u9762\u706B\u529B\u8986\u76D6\u8303\u56F4\u5185\u3002","(4, 8, 8, 1)"],[ 8, 8,"Boss","\u9ED1\u7FFC\u2014\u2014\u2014\u7B2C\u516D\u964D\u4E34\u8005", 100, 0, 0, 60000,"\u4EBA\u7C7B\u6297\u4E89\u5916\u661F\u6218\u6597\u4E2D\u8BB0\u8F7D\u4E2D\u5C11\u6709\u7684\u6570\u4E2A\uFF0C\u5177\u6709\u6781\u9AD8\u5371\u9669\u7CFB\u6570\u7684\u6218\u6597\u5355\u4F4D\u4E4B\u4E00\n","(5, 10, 10, 10)"]]},"PropData":{"Columns":["ID","PropId","PropNameCn","PropName","PropDesc","Effect"],"Values":[[ 1, 501,"\u8840\u5305","BloodBag","\u7ED9\u89D2\u8272\u52A0\u8840",0.5],[ 3, 503,"\u653B\u51FBbuff","AtkBuff","\u589E\u52A0\u89D2\u8272\u653B\u51FB\u529B",0.5],[ 4, 504,"\u9632\u5FA1buff","DefenseBuff","\u589E\u52A0\u89D2\u8272\u9632\u5FA1\u529B",-0.5],[ 5, 505,"\u80FD\u6E90\u9B54\u65B9","EnergyPump","\u7528\u6765\u5F00\u542F\u4E0B\u4E00\u6BB5\u5267\u60C5", 1],[ 6, 506,"\u5F00\u542F\u6E38\u620F\u7684\u4F20\u9001\u9635","StartGamePoint","\u7528\u6765\u5F00\u542F\u6E38\u620F",-1]]},"PlayerBulletData":{"Columns":["ID","Name","Name_CN","Damage","Number"],"Values":[[ 1,"PlayerWeapon1","\u521D\u59CB\u5355\u70B9\u67AA","((60,180))",-1],[ 2,"PlayerWeapon2","\u8FDE\u5C04\u67AA","((100,200))", 300],[ 3,"PlayerWeapon3","\u8FFD\u8E2A\u67AA","((200,300))", 300],[ 4,"PlayerWeapon4","\u5C0F\u578B\u6FC0\u5149\u67AA","((600,720))", 50],[ 5,"PlayerWeapon5","\u591A\u53D1\u6FC0\u5149\u67AA","((720,960))", 30],[ 6,"PlayerWeapon6","\u5355\u4E2A\u5149\u7403\u67AA","((420,540))", 50],[ 7,"PlayerWeapon7","\u53CC\u4E2A\u5149\u7403\u67AA","((240,360))", 50],[ 8,"PlayerWeapon8","\u591A\u53D1\u5BFC\u5F39\u67AA","((60,120))", 30],[ 9,"PlayerWeapon9","\u5927\u5BFC\u5F39\u67AA","((720,960))", 30],[ 10,"PlayerWeapon10","\u6301\u7EED\u6FC0\u5149\u67AA","((24,60))", 300]]},"EnemyBulletData":{"Columns":["ID","Name","Name_CN","Damage","Number"],"Values":[[ 1,"DropShipBullet1","\u5916\u661F\u8FD0\u8F93\u673A\u666E\u901A\u5B50\u5F39","((50,150))",-1],[ 2,"DropShipBullet2","\u5916\u661F\u8FD0\u8F93\u673A\u7279\u6B8A\u5B50\u5F39","((300,450))",-1],[ 3,"Enemy1","\u5916\u661F\u67AA\u624B\u5B50\u5F39","((50,150))",-1],[ 4,"LeviathanBullet1","\u5229\u7EF4\u5766\u666E\u901A\u5B50\u5F39","((20,30))",-1],[ 5,"LeviathanBullet2","\u5229\u7EF4\u5766\u7279\u6B8A\u5B50\u5F39","((300,450))",-1],[ 6,"Enemy2","\u98DE\u884C\u5175\u5B50\u5F39","((60,150))",-1],[ 7,"MachineDragonBullet","\u9738\u738B\u9F99\u666E\u901A\u5B50\u5F39","((500,600))",-1],[ 8,"MachineDragonBullet2","\u9738\u738B\u9F99\u7279\u6B8A\u5B50\u5F39","((400,600))",-1],[ 9,"Enemy3","\u54E8\u5175\u722A\u51FB","((100,150))",-1],[ 10,"Boss1","boss\u6B63\u5E38\u5B50\u5F39","((20,50))",-1],[ 11,"Boss2","boss\u7279\u6B8A\u653B\u51FB","((300,500))",-1],[ 12,"Boss3","boss\u53EC\u5524\u653B\u51FB","((100,150))",-1]]},"BossPosData":{"Columns":["ID","BossPos","BossAng","DoorPos","DoorAng","DoorScale"],"Values":[[ 0,"(2.97,0,2.5)","(0,0,0)","(2.34,2,0.55)","(0,180,0)", 1.5],[ 1,"(-11.62,5,2.19)","(0,90,0)","(-4.757,-5,2.64)","(0,90,0)", 4.5],[ 2,"(4.34,-3.5,13.486)","(0,-180,0)","(4.305,-2.2,2.89)","(0,-180,0)", 4.5],[ 3,"(5.79,0,1.74)","(0,-90,0)","(4.21,-3.3,2.169)","(0,-90,0)", 3],[ 4,"(-3.17,3,1.32)","(0,45,0)","(-3.87,0,1.07)","(0,45,0)", 3]]},"":{"Columns":[],"Values":[]}}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 01e46c8dbbf44ce4688313844b03ff11
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4519a66fdb35dc746b2a564ad24593c3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aafb029dec8500d4cb3f3f85399f8c46
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 01ef61f02ad250b419a915a84e327315
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8d86d8c518b80834cb4f27437f7f42c9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a6e70dd56dacb864a9f6174718a8bcd5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 23800000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -406,6 +406,13 @@ public class Boss : Enemy
Both();
});
}
if (GameInit.Ins.gamePlace == GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
{
transform.DOMove(new Vector3(-2.23f, 3f, 1.7f), 4).OnComplete(() =>
{
Both();
});
}
else
{

View File

@@ -626,6 +626,21 @@ public class DropShip : Enemy
_isShow = false;
});
}
if (GameInit.Ins.gamePlace == GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
{
transform.DOMove(new Vector3(2.44f, 5f, 6.64f), 4).OnComplete(() =>
{
isAttack = true;
foreach (var item in tailGas)
{
item.SetActive(true);
}
bloodSlider.gameObject.SetActive(true);
isShield = false;
shieldObj.SetActive(false);
_isShow = false;
});
}
else
{

View File

@@ -397,6 +397,13 @@ public class Leviathan : Enemy
Both();
});
}
else if (GameInit.Ins.gamePlace == GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
{
transform.DOMove(new Vector3(-6.75f, -3.5f, -3.57f), 2).OnComplete(() =>
{
Both();
});
}
else
{

View File

@@ -382,6 +382,13 @@ public class MachineDragon : Enemy
Both();
});
}
else if (GameInit.Ins.gamePlace == GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
{
transform.DOMove(new Vector3(-3.93f, 0f, 1.52f), 4).OnComplete(() =>
{
Both();
});
}
else
{

View File

@@ -41,6 +41,7 @@ public enum GamePlace
Nanjing_Qixia_Yaohuamen_Jindiguangchang = 17,
Nanjing_Qixia_Yaohuamen_Jindiguangchang_nei = -17,
Anshan_Suzhou_Yueshan_Guchengshangyejie = 18,
Anhui_Suzhou_Yueshan_Guchengshangyejie_2=-18,
Gansu_Longnan_Shicheng_Dongsheng = 19,
Shandong_Heze_Yuncheng_Gefuli = 20,
Wulanhaote_Ouya_Shangchang = 21,
@@ -153,7 +154,7 @@ public class GameManager : MonoBehaviour
[Header("AI角色")]
public GameObject aiCharacterPre;//AI角色预制体
private GameObject aiCharacter;//AI角色实例
private void Awake()
{
@@ -203,6 +204,8 @@ public class GameManager : MonoBehaviour
loginInfo.shop = 15;
if(GameInit.Ins.gamePlace== GamePlace.Nanjing_Qixia_Yaohuamen_Jindiguangchang_nei)
loginInfo.shop = 17;
if(GameInit.Ins.gamePlace== GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
loginInfo.shop = 18;
if(GameInit.Ins.gamePlace== GamePlace.Wulanhaote_Wanda_Shangchang)
loginInfo.shop = 21;
if(GameInit.Ins.gamePlace== GamePlace.Hunan_Hengyang_Zhuhui_Dongzhoudao_nei)
@@ -607,6 +610,10 @@ public class GameManager : MonoBehaviour
{
EnergyPump.transform.position = new Vector3(-1.33f, 0, 17.38f);
}
if (GameInit.Ins.gamePlace == GamePlace.Anhui_Suzhou_Yueshan_Guchengshangyejie_2)
{
EnergyPump.transform.position = new Vector3(2f, 0, 2f);
}
EnergyPumpTag++;
EnergyPump.GetComponent<EnergyPump>().Init(EnergyPumpTag);
@@ -824,7 +831,11 @@ public class GameManager : MonoBehaviour
ShowEndGameUI(true);
GameInit.Ins.PlayAudio("1.17", GameInit.Ins.self.transform, true);
AudioManager.Ins?.SoundPlay("bgm4", true);
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
{
Debug.Log("游戏结束5秒后退出");
Application.Quit();
}, 6f);
////修改处销毁AI角色
if (aiCharacter != null)
{
@@ -852,7 +863,11 @@ public class GameManager : MonoBehaviour
isGameEnd = true;
CurEnemyDie();
AudioManager.Ins?.SoundPlay("bgm4", true);
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
{
Debug.Log("游戏结束5秒后退出");
Application.Quit();
}, 6f);
//修改处销毁AI角色
if (aiCharacter != null)
{

View File

@@ -1 +1 @@
Build from ZTT at 2025/11/27 16:50:34
Build from ZTT at 2025/12/4 15:20:39

8
Assets/_Valheim.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: edd8434c39022224eb8f2fec63fce621
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 370bd0a2ac080bf4c9b133157b09d398
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 54919009a377d45478c36798943614d2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5f7ec275969af6d48a7992e31a3da591
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,172 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &718552219040796497
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 718552219040796499}
- component: {fileID: 718552219040796498}
- component: {fileID: 718552219040796508}
- component: {fileID: -1289911475552001029}
m_Layer: 0
m_Name: PathGuide
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &718552219040796499
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 718552219040796497}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!120 &718552219040796498
LineRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 718552219040796497}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d89e79b4cfdd0ae4e9a7b611c4b172b1, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 4
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 0
m_Loop: 0
m_ApplyActiveColorSpace: 0
--- !u!114 &718552219040796508
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 718552219040796497}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8cdda35296b966646ada44468a5c40c5, type: 3}
m_Name:
m_EditorClassIdentifier:
syncDirection: 0
syncMode: 0
syncInterval: 0
--- !u!114 &-1289911475552001029
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 718552219040796497}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneId: 0
_assetId: 4156201627
serverOnly: 0
visible: 0
hasSpawned: 0

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1090ff9efb8eaa94cbdc6dfa4042d3b7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 90f657f4a7dedee4cbb9b389b5c2afcb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3475d68d034ad1343bb80e1fffedf27f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,251 @@
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(LineRenderer))]
public class GuideArrowPath : MonoBehaviour
{
[SerializeField] private LineRenderer lineRenderer; // 序列化字段,可以通过编辑器设置
// 新增:路径平滑参数
public float smoothSpeed = 5f;
private List<Vector3> targetPath = new List<Vector3>();
private List<Vector3> currentPath = new List<Vector3>();
private bool isTransitioning = false;
// 路径显示设置
public LayerMask obstacleMask = 1;
public float pathHeight = 0.5f;
public int maxPathPoints = 50; // 限制路径点数量
public float minPointDistance = 0.1f; // 最小点间距
void Awake()
{
// 确保获取预制体上的LineRenderer
if (lineRenderer == null)
{
lineRenderer = GetComponent<LineRenderer>();
if (lineRenderer == null)
{
Debug.LogError("GuideArrowPre预制体缺少LineRenderer组件");
return;
}
}
// 初始化LineRenderer
InitializeLineRenderer();
}
void Update()
{
// 平滑过渡路径
if (isTransitioning && targetPath.Count > 0)
{
SmoothTransitionPath();
}
}
private void InitializeLineRenderer()
{
// 确保有LineRenderer组件
if (lineRenderer == null)
{
lineRenderer = GetComponent<LineRenderer>();
if (lineRenderer == null)
{
Debug.LogError("无法找到LineRenderer组件");
return;
}
}
// 设置默认LineRenderer属性
// 注意:这些设置可能会被预制体上的设置覆盖
if (lineRenderer.material == null)
{
lineRenderer.material = new Material(Shader.Find("Sprites/Default"));
}
if (lineRenderer.startWidth <= 0)
{
lineRenderer.startWidth = 0.1f;
lineRenderer.endWidth = 0.05f;
}
if (lineRenderer.startColor == Color.clear)
{
lineRenderer.startColor = Color.cyan;
lineRenderer.endColor = Color.blue;
}
lineRenderer.positionCount = 0;
}
/// <summary>
/// 设置路径(外部调用)
/// </summary>
public void SetPath(List<Vector3> path)
{
if (path == null || path.Count < 2)
return;
// 优化路径点数量
path = OptimizePathPoints(path);
// 设置目标路径
targetPath = new List<Vector3>(path);
// 如果当前没有路径,直接设置
if (currentPath.Count == 0)
{
currentPath = new List<Vector3>(targetPath);
UpdateLineRenderer(currentPath);
}
else
{
// 开始平滑过渡
isTransitioning = true;
}
}
/// <summary>
/// 平滑过渡路径
/// </summary>
private void SmoothTransitionPath()
{
bool pathChanged = false;
// 确保当前路径和目标路径长度一致
while (currentPath.Count < targetPath.Count)
currentPath.Add(targetPath[0]);
while (currentPath.Count > targetPath.Count)
currentPath.RemoveAt(currentPath.Count - 1);
// 平滑移动每个点
for (int i = 0; i < targetPath.Count; i++)
{
Vector3 targetPoint = targetPath[i];
Vector3 currentPoint = currentPath[i];
// 如果点距离较远,使用平滑移动
if (Vector3.Distance(currentPoint, targetPoint) > minPointDistance)
{
currentPath[i] = Vector3.Lerp(currentPoint, targetPoint,
Time.deltaTime * smoothSpeed);
pathChanged = true;
}
}
// 更新渲染
if (pathChanged)
{
UpdateLineRenderer(currentPath);
}
else
{
isTransitioning = false;
}
}
/// <summary>
/// 优化路径点数量
/// </summary>
private List<Vector3> OptimizePathPoints(List<Vector3> path)
{
if (path.Count <= maxPathPoints)
return path;
List<Vector3> optimized = new List<Vector3>();
float step = (float)path.Count / maxPathPoints;
for (int i = 0; i < maxPathPoints; i++)
{
int index = Mathf.Min(Mathf.FloorToInt(i * step), path.Count - 1);
optimized.Add(path[index]);
}
// 确保包含起点和终点
if (!optimized.Contains(path[0]))
optimized[0] = path[0];
if (!optimized.Contains(path[path.Count - 1]))
optimized[optimized.Count - 1] = path[path.Count - 1];
return optimized;
}
/// <summary>
/// 更新LineRenderer
/// </summary>
private void UpdateLineRenderer(List<Vector3> path)
{
if (lineRenderer == null || path.Count < 2)
return;
// 调整高度
Vector3[] adjustedPath = new Vector3[path.Count];
for (int i = 0; i < path.Count; i++)
{
adjustedPath[i] = new Vector3(path[i].x, pathHeight, path[i].z);
}
lineRenderer.positionCount = adjustedPath.Length;
lineRenderer.SetPositions(adjustedPath);
}
/// <summary>
/// 显示路径
/// </summary>
public void ShowPath()
{
if (lineRenderer != null)
lineRenderer.enabled = true;
}
/// <summary>
/// 隐藏路径
/// </summary>
public void ClosePath()
{
if (lineRenderer != null)
lineRenderer.enabled = false;
}
/// <summary>
/// 清理路径数据
/// </summary>
public void ClearPath()
{
targetPath.Clear();
currentPath.Clear();
isTransitioning = false;
if (lineRenderer != null)
{
lineRenderer.positionCount = 0;
}
}
/// <summary>
/// 获取当前路径点数量
/// </summary>
public int GetPathPointCount()
{
return currentPath.Count;
}
/// <summary>
/// 获取路径总长度
/// </summary>
public float GetPathLength()
{
if (currentPath.Count < 2) return 0f;
float length = 0f;
for (int i = 1; i < currentPath.Count; i++)
{
length += Vector3.Distance(currentPath[i - 1], currentPath[i]);
}
return length;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8cdda35296b966646ada44468a5c40c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 82381578421ed6f46a71108391f8b8b8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4e72bcafaea60c34d987bcc55e8a1efd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3fc6b4791ea7b264d807d04d13228662
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1ff6d673257c5b34ab043fe3bebac795
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,78 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RaycastInstance : MonoBehaviour
{
public Camera Cam;
public GameObject[] Prefabs;
private int Prefab;
private Ray RayMouse;
private GameObject Instance;
private float windowDpi;
//Double-click protection
private float buttonSaver = 0f;
void Start()
{
if (Screen.dpi < 1) windowDpi = 1;
if (Screen.dpi < 200) windowDpi = 1;
else windowDpi = Screen.dpi / 200f;
Counter(0);
}
void Update()
{
if (Input.GetButtonDown("Fire1"))
{
if (Cam != null)
{
RaycastHit hit;
var mousePos = Input.mousePosition;
RayMouse = Cam.ScreenPointToRay(mousePos);
if (Physics.Raycast(RayMouse.origin, RayMouse.direction, out hit, 40))
{
Instance = Instantiate(Prefabs[Prefab]);
Instance.transform.position = hit.point + hit.normal * 0.01f;
Destroy(Instance, 1.5f);
}
}
else
{
Debug.Log("No camera");
}
}
if ((Input.GetKey(KeyCode.A) || Input.GetAxis("Horizontal") < 0) && buttonSaver >= 0.4f)// left button
{
buttonSaver = 0f;
Counter(-1);
}
if ((Input.GetKey(KeyCode.D) || Input.GetAxis("Horizontal") > 0) && buttonSaver >= 0.4f)// right button
{
buttonSaver = 0f;
Counter(+1);
}
buttonSaver += Time.deltaTime;
}
void OnGUI()
{
GUI.Label(new Rect(10 * windowDpi, 5 * windowDpi, 400 * windowDpi, 20 * windowDpi), "Use the keyboard buttons A/<- and D/-> to change prefabs!");
GUI.Label(new Rect(10 * windowDpi, 20 * windowDpi, 400 * windowDpi, 20 * windowDpi), "Use left mouse button for instancing!");
}
void Counter(int count)
{
Prefab += count;
if (Prefab > Prefabs.Length - 1)
{
Prefab = 0;
}
else if (Prefab < 0)
{
Prefab = Prefabs.Length - 1;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d8525fc6b3b62e24e86a37b99d3aec83
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f78bc7d80b83d164abc6373ca90c6ace
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,111 @@
%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: Shield2bcg 1
m_Shader: {fileID: 4800000, guid: b68b99c2e57cef4419465c63c527201b, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _USEDEPTH_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _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}
- _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}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Flow:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: e6f1be8867d4eb246825875f8ab19c1e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask:
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}
- _Noise:
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}
- _texcoord:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _CullMode: 0
- _Cutoff: 0.5
- _Depthpower: 0.15
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 2
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 3
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Opacity: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _Usecenterglow: 0
- _Usedepth: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DistortionSpeedXYPowerZ: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpeedMainTexUVNoiseUV: {r: 0, g: 0, b: 0, a: 0}
- _SpeedMainTexUVNoiseZW: {r: -1, g: 0, b: 0, a: 0}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDistortionOpacity: {r: -1, g: 0, b: 1, a: 0.4}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d89e79b4cfdd0ae4e9a7b611c4b172b1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 40cf9077cec9f4f43b1f7f0720e0c6af
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EGA_EffectSound : MonoBehaviour
{
public bool Repeating = true;
public float RepeatTime = 2.0f;
public float StartTime = 0.0f;
public bool RandomVolume;
public float minVolume = .4f;
public float maxVolume = 1f;
private AudioClip clip;
private AudioSource soundComponent;
void Start ()
{
soundComponent = GetComponent<AudioSource>();
clip = soundComponent.clip;
if (RandomVolume == true)
{
soundComponent.volume = Random.Range(minVolume, maxVolume);
RepeatSound();
}
if (Repeating == true)
{
InvokeRepeating("RepeatSound", StartTime, RepeatTime);
}
}
void RepeatSound()
{
soundComponent.PlayOneShot(clip);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a79ba5bb0b3780b4a98ce45e779b6441
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,125 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System;
using UnityEngine;
public class Hovl_DemoLasers : MonoBehaviour
{
public GameObject FirePoint;
public Camera Cam;
public float MaxLength;
public GameObject[] Prefabs;
private Ray RayMouse;
private Vector3 direction;
private Quaternion rotation;
[Header("GUI")]
private float windowDpi;
private int Prefab;
private GameObject Instance;
private Hovl_Laser LaserScript;
private Hovl_Laser2 LaserScript2;
//Double-click protection
private float buttonSaver = 0f;
void Start ()
{
//LaserEndPoint = new Vector3(0, 0, 0);
if (Screen.dpi < 1) windowDpi = 1;
if (Screen.dpi < 200) windowDpi = 1;
else windowDpi = Screen.dpi / 200f;
Counter(0);
}
void Update()
{
//Enable lazer
if (Input.GetMouseButtonDown(0))
{
Destroy(Instance);
Instance = Instantiate(Prefabs[Prefab], FirePoint.transform.position, FirePoint.transform.rotation);
Instance.transform.parent = transform;
LaserScript = Instance.GetComponent<Hovl_Laser>();
LaserScript2 = Instance.GetComponent<Hovl_Laser2>();
}
//Disable lazer prefab
if (Input.GetMouseButtonUp(0))
{
if (LaserScript) LaserScript.DisablePrepare();
if (LaserScript2) LaserScript2.DisablePrepare();
Destroy(Instance,1);
}
//To change lazers
if ((Input.GetKey(KeyCode.A) || Input.GetAxis("Horizontal") < 0) && buttonSaver >= 0.4f)// left button
{
buttonSaver = 0f;
Counter(-1);
}
if ((Input.GetKey(KeyCode.D) || Input.GetAxis("Horizontal") > 0) && buttonSaver >= 0.4f)// right button
{
buttonSaver = 0f;
Counter(+1);
}
buttonSaver += Time.deltaTime;
//Current fire point
if (Cam != null)
{
RaycastHit hit; //DELATE THIS IF YOU WANT TO USE LASERS IN 2D
var mousePos = Input.mousePosition;
RayMouse = Cam.ScreenPointToRay(mousePos);
//ADD THIS IF YOU WANT TO USE LASERS IN 2D: RaycastHit2D hit = Physics2D.Raycast(RayMouse.origin, RayMouse.direction, MaxLength);
if (Physics.Raycast(RayMouse.origin, RayMouse.direction, out hit, MaxLength)) //CHANGE THIS IF YOU WANT TO USE LASERRS IN 2D: if (hit.collider != null)
{
RotateToMouseDirection(gameObject, hit.point);
//LaserEndPoint = hit.point;
}
else
{
var pos = RayMouse.GetPoint(MaxLength);
RotateToMouseDirection(gameObject, pos);
//LaserEndPoint = pos;
}
}
else
{
Debug.Log("No camera");
}
}
//GUI Text
void OnGUI()
{
GUI.Label(new Rect(10 * windowDpi, 5 * windowDpi, 400 * windowDpi, 20 * windowDpi), "Use the keyboard buttons A/<- and D/-> to change lazers!");
GUI.Label(new Rect(10 * windowDpi, 20 * windowDpi, 400 * windowDpi, 20 * windowDpi), "Use left mouse button for shooting!");
}
//To change prefabs (count - prefab number)
void Counter(int count)
{
Prefab += count;
if (Prefab > Prefabs.Length - 1)
{
Prefab = 0;
}
else if (Prefab < 0)
{
Prefab = Prefabs.Length - 1;
}
}
//To rotate fire point
void RotateToMouseDirection (GameObject obj, Vector3 destination)
{
direction = destination - obj.transform.position;
rotation = Quaternion.LookRotation(direction);
obj.transform.localRotation = Quaternion.Lerp(obj.transform.rotation, rotation, 1);
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 49045f8566c3d744ba127b2ab18f25e5
timeCreated: 1536001444
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,115 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System;
using UnityEngine;
public class Hovl_Laser : MonoBehaviour
{
public GameObject HitEffect;
public float HitOffset = 0;
public bool useLaserRotation = false;
public float MaxLength;
private LineRenderer Laser;
public float MainTextureLength = 1f;
public float NoiseTextureLength = 1f;
private Vector4 Length = new Vector4(1,1,1,1);
//private Vector4 LaserSpeed = new Vector4(0, 0, 0, 0); {DISABLED AFTER UPDATE}
//private Vector4 LaserStartSpeed; {DISABLED AFTER UPDATE}
//One activation per shoot
private bool LaserSaver = false;
private bool UpdateSaver = false;
private ParticleSystem[] Effects;
private ParticleSystem[] Hit;
void Start ()
{
//Get LineRender and ParticleSystem components from current prefab;
Laser = GetComponent<LineRenderer>();
Effects = GetComponentsInChildren<ParticleSystem>();
Hit = HitEffect.GetComponentsInChildren<ParticleSystem>();
//if (Laser.material.HasProperty("_SpeedMainTexUVNoiseZW")) LaserStartSpeed = Laser.material.GetVector("_SpeedMainTexUVNoiseZW");
//Save [1] and [3] textures speed
//{ DISABLED AFTER UPDATE}
//LaserSpeed = LaserStartSpeed;
}
void Update()
{
//if (Laser.material.HasProperty("_SpeedMainTexUVNoiseZW")) Laser.material.SetVector("_SpeedMainTexUVNoiseZW", LaserSpeed);
//SetVector("_TilingMainTexUVNoiseZW", Length); - old code, _TilingMainTexUVNoiseZW no more exist
Laser.material.SetTextureScale("_MainTex", new Vector2(Length[0], Length[1]));
Laser.material.SetTextureScale("_Noise", new Vector2(Length[2], Length[3]));
//To set LineRender position
if (Laser != null && UpdateSaver == false)
{
Laser.SetPosition(0, transform.position);
RaycastHit hit; //DELETE THIS IF YOU WANT USE LASERS IN 2D
//ADD THIS IF YOU WANNT TO USE LASERS IN 2D: RaycastHit2D hit = Physics2D.Raycast(transform.position, transform.forward, MaxLength);
if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, MaxLength))//CHANGE THIS IF YOU WANT TO USE LASERRS IN 2D: if (hit.collider != null)
{
//End laser position if collides with object
Laser.SetPosition(1, hit.point);
HitEffect.transform.position = hit.point + hit.normal * HitOffset;
if (useLaserRotation)
HitEffect.transform.rotation = transform.rotation;
else
HitEffect.transform.LookAt(hit.point + hit.normal);
foreach (var AllPs in Effects)
{
if (!AllPs.isPlaying) AllPs.Play();
}
//Texture tiling
Length[0] = MainTextureLength * (Vector3.Distance(transform.position, hit.point));
Length[2] = NoiseTextureLength * (Vector3.Distance(transform.position, hit.point));
//Texture speed balancer {DISABLED AFTER UPDATE}
//LaserSpeed[0] = (LaserStartSpeed[0] * 4) / (Vector3.Distance(transform.position, hit.point));
//LaserSpeed[2] = (LaserStartSpeed[2] * 4) / (Vector3.Distance(transform.position, hit.point));
}
else
{
//End laser position if doesn't collide with object
var EndPos = transform.position + transform.forward * MaxLength;
Laser.SetPosition(1, EndPos);
HitEffect.transform.position = EndPos;
foreach (var AllPs in Hit)
{
if (AllPs.isPlaying) AllPs.Stop();
}
//Texture tiling
Length[0] = MainTextureLength * (Vector3.Distance(transform.position, EndPos));
Length[2] = NoiseTextureLength * (Vector3.Distance(transform.position, EndPos));
//LaserSpeed[0] = (LaserStartSpeed[0] * 4) / (Vector3.Distance(transform.position, EndPos)); {DISABLED AFTER UPDATE}
//LaserSpeed[2] = (LaserStartSpeed[2] * 4) / (Vector3.Distance(transform.position, EndPos)); {DISABLED AFTER UPDATE}
}
//Insurance against the appearance of a laser in the center of coordinates!
if (Laser.enabled == false && LaserSaver == false)
{
LaserSaver = true;
Laser.enabled = true;
}
}
}
public void DisablePrepare()
{
if (Laser != null)
{
Laser.enabled = false;
}
UpdateSaver = true;
//Effects can = null in multiply shooting
if (Effects != null)
{
foreach (var AllPs in Effects)
{
if (AllPs.isPlaying) AllPs.Stop();
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 6bc3dcf38a0c09643a993ed6d614c10a
timeCreated: 1536001444
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,146 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System;
using UnityEngine;
public class Hovl_Laser2 : MonoBehaviour
{
public float laserScale = 1;
public Color laserColor = new Vector4(1,1,1,1);
public GameObject HitEffect;
public GameObject FlashEffect;
public float HitOffset = 0;
public float MaxLength;
private bool UpdateSaver = false;
private ParticleSystem laserPS;
private ParticleSystem[] Flash;
private ParticleSystem[] Hit;
private Material laserMat;
private int particleCount;
private ParticleSystem.Particle[] particles;
private Vector3[] particlesPositions;
private float dissovleTimer = 0;
private bool startDissovle = false;
void Start()
{
laserPS = GetComponent<ParticleSystem>();
laserMat = GetComponent<ParticleSystemRenderer>().material;
Flash = FlashEffect.GetComponentsInChildren<ParticleSystem>();
Hit = HitEffect.GetComponentsInChildren<ParticleSystem>();
laserMat.SetFloat("_Scale", laserScale);
}
void Update()
{
if (laserPS != null && UpdateSaver == false)
{
//Set start laser point
laserMat.SetVector("_StartPoint", transform.position);
//Set end laser point
RaycastHit hit;
if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, MaxLength))
{
particleCount = Mathf.RoundToInt(hit.distance / (2 * laserScale));
if (particleCount < hit.distance / (2 * laserScale))
{
particleCount += 1;
}
particlesPositions = new Vector3[particleCount];
AddParticles();
laserMat.SetFloat("_Distance", hit.distance);
laserMat.SetVector("_EndPoint", hit.point);
if (Hit != null)
{
HitEffect.transform.position = hit.point + hit.normal * HitOffset;
HitEffect.transform.LookAt(hit.point);
foreach (var AllHits in Hit)
{
if (!AllHits.isPlaying) AllHits.Play();
}
foreach (var AllFlashes in Flash)
{
if (!AllFlashes.isPlaying) AllFlashes.Play();
}
}
}
else
{
//End laser position if doesn't collide with object
var EndPos = transform.position + transform.forward * MaxLength;
var distance = Vector3.Distance(EndPos, transform.position);
particleCount = Mathf.RoundToInt(distance / (2 * laserScale));
if (particleCount < distance / (2 * laserScale))
{
particleCount += 1;
}
particlesPositions = new Vector3[particleCount];
AddParticles();
laserMat.SetFloat("_Distance", distance);
laserMat.SetVector("_EndPoint", EndPos);
if (Hit != null)
{
HitEffect.transform.position = EndPos;
foreach (var AllPs in Hit)
{
if (AllPs.isPlaying) AllPs.Stop();
}
}
}
}
if (startDissovle)
{
dissovleTimer += Time.deltaTime;
laserMat.SetFloat("_Dissolve", dissovleTimer*5);
}
}
void AddParticles()
{
//Old particles settings
/*
var normalDistance = particleCount;
var sh = LaserPS.shape;
sh.radius = normalDistance;
sh.position = new Vector3(0,0, normalDistance);
LaserPS.emission.SetBursts(new[] { new ParticleSystem.Burst(0f, particleCount + 1) });
*/
particles = new ParticleSystem.Particle[particleCount];
for (int i = 0; i < particleCount; i++)
{
particlesPositions[i] = new Vector3(0f, 0f, 0f) + new Vector3(0f, 0f, i * 2 * laserScale);
particles[i].position = particlesPositions[i];
particles[i].startSize3D = new Vector3(0.001f, 0.001f, 2 * laserScale);
particles[i].startColor = laserColor;
}
laserPS.SetParticles(particles, particles.Length);
}
public void DisablePrepare()
{
transform.parent = null;
dissovleTimer = 0;
startDissovle = true;
UpdateSaver = true;
if (Flash != null && Hit != null)
{
foreach (var AllHits in Hit)
{
if (AllHits.isPlaying) AllHits.Stop();
}
foreach (var AllFlashes in Flash)
{
if (AllFlashes.isPlaying) AllFlashes.Stop();
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b7c107ae524aed749b3de3034023eb9d
timeCreated: 1536001444
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
/*This script created by using docs.unity3d.com/ScriptReference/MonoBehaviour.OnParticleCollision.html*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ParticleCollisionInstance : MonoBehaviour
{
public GameObject[] EffectsOnCollision;
public float DestroyTimeDelay = 5;
public bool UseWorldSpacePosition;
public float Offset = 0;
public Vector3 rotationOffset = new Vector3(0,0,0);
public bool useOnlyRotationOffset = true;
public bool UseFirePointRotation;
public bool DestoyMainEffect = true;
private ParticleSystem part;
private List<ParticleCollisionEvent> collisionEvents = new List<ParticleCollisionEvent>();
private ParticleSystem ps;
void Start()
{
part = GetComponent<ParticleSystem>();
}
void OnParticleCollision(GameObject other)
{
int numCollisionEvents = part.GetCollisionEvents(other, collisionEvents);
for (int i = 0; i < numCollisionEvents; i++)
{
foreach (var effect in EffectsOnCollision)
{
var instance = Instantiate(effect, collisionEvents[i].intersection + collisionEvents[i].normal * Offset, new Quaternion()) as GameObject;
if (!UseWorldSpacePosition) instance.transform.parent = transform;
if (UseFirePointRotation) { instance.transform.LookAt(transform.position); }
else if (rotationOffset != Vector3.zero && useOnlyRotationOffset) { instance.transform.rotation = Quaternion.Euler(rotationOffset); }
else
{
instance.transform.LookAt(collisionEvents[i].intersection + collisionEvents[i].normal);
instance.transform.rotation *= Quaternion.Euler(rotationOffset);
}
Destroy(instance, DestroyTimeDelay);
}
}
if (DestoyMainEffect == true)
{
Destroy(gameObject, DestroyTimeDelay + 0.5f);
}
}
}

View File

@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 1a959a1b0b8414d4fb8a68bdc12d69ed
timeCreated: 1516192333
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,21 @@
using System.Collections;
using UnityEngine;
public class Rotator : MonoBehaviour
{
public float x = 0f;
public float y = 0f;
public float z = 0f;
void OnEnable()
{
InvokeRepeating("Rotate", 0f, 0.0167f);
}
void OnDisable()
{
CancelInvoke();
}
void Rotate()
{
this.transform.localEulerAngles += new Vector3(x,y,z);
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 268fb4d91644e42409780f6594097609
timeCreated: 1490959302
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 50c50834f3f856e4880b0d27b200c5d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3427e7d99d37abd439860d10baf70128
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dea132fdb191f1749834c8c606023972
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,164 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System;
using UnityEngine;
public class HS_CameraHolder : MonoBehaviour
{
//camera holder
public Transform Holder;
public Vector3 cameraPos = new Vector3(0, 0, 0);
public float currDistance = 5.0f;
public float xRotate = 250.0f;
public float yRotate = 120.0f;
public float yMinLimit = -20f;
public float yMaxLimit = 80f;
public float prevDistance;
private float x = 0.0f;
private float y = 0.0f;
[Header("GUI")]
private float windowDpi;
public GameObject[] Prefabs;
private int Prefab;
private GameObject Instance;
private float StartColor;
private float HueColor;
public Texture HueTexture;
void Start()
{
if (Screen.dpi < 1) windowDpi = 1;
if (Screen.dpi < 200) windowDpi = 1;
else windowDpi = Screen.dpi / 200f;
var angles = transform.eulerAngles;
x = angles.y;
y = angles.x;
Counter(0);
}
private void OnGUI()
{
if (GUI.Button(new Rect(5 * windowDpi, 5 * windowDpi, 110 * windowDpi, 35 * windowDpi), "Previous effect"))
{
Counter(-1);
}
if (GUI.Button(new Rect(120 * windowDpi, 5 * windowDpi, 110 * windowDpi, 35 * windowDpi), "Play again"))
{
Counter(0);
}
if (GUI.Button(new Rect(235 * windowDpi, 5 * windowDpi, 110 * windowDpi, 35 * windowDpi), "Next effect"))
{
Counter(+1);
}
StartColor = HueColor;
HueColor = GUI.HorizontalSlider(new Rect(5 * windowDpi, 45 * windowDpi, 340 * windowDpi, 35 * windowDpi), HueColor, 0, 1);
GUI.DrawTexture(new Rect(5 * windowDpi, 65 * windowDpi, 340 * windowDpi, 15 * windowDpi), HueTexture, ScaleMode.StretchToFill, false, 0);
if (HueColor != StartColor)
{
int i = 0;
foreach (var ps in particleSystems)
{
var main = ps.main;
Color colorHSV = Color.HSVToRGB(HueColor + H * 0, svList[i].S, svList[i].V);
main.startColor = new Color(colorHSV.r, colorHSV.g, colorHSV.b, svList[i].A);
i++;
}
}
}
private ParticleSystem[] particleSystems = new ParticleSystem[0];
private List<SVA> svList = new List<SVA>();
private float H;
public struct SVA
{
public float S;
public float V;
public float A;
}
void Counter(int count)
{
Prefab += count;
if (Prefab > Prefabs.Length - 1)
{
Prefab = 0;
}
else if (Prefab < 0)
{
Prefab = Prefabs.Length - 1;
}
if (Instance != null)
{
Destroy(Instance);
}
Instance = Instantiate(Prefabs[Prefab]);
particleSystems = Instance.GetComponentsInChildren<ParticleSystem>(); //Get color from current instance
svList.Clear();
foreach (var ps in particleSystems)
{
Color baseColor = ps.main.startColor.color;
SVA baseSVA = new SVA();
Color.RGBToHSV(baseColor, out H, out baseSVA.S, out baseSVA.V);
baseSVA.A = baseColor.a;
svList.Add(baseSVA);
}
}
void LateUpdate()
{
if (currDistance < 2)
{
currDistance = 2;
}
currDistance -= Input.GetAxis("Mouse ScrollWheel") * 2;
if (Holder && (Input.GetMouseButton(0) || Input.GetMouseButton(1)))
{
var pos = Input.mousePosition;
float dpiScale = 1;
if (Screen.dpi < 1) dpiScale = 1;
if (Screen.dpi < 200) dpiScale = 1;
else dpiScale = Screen.dpi / 200f;
if (pos.x < 380 * dpiScale && Screen.height - pos.y < 250 * dpiScale) return;
Cursor.visible = false;
Cursor.lockState = CursorLockMode.Locked;
x += (float)(Input.GetAxis("Mouse X") * xRotate * 0.02);
y -= (float)(Input.GetAxis("Mouse Y") * yRotate * 0.02);
y = ClampAngle(y, yMinLimit, yMaxLimit);
var rotation = Quaternion.Euler(y, x, 0);
var position = rotation * new Vector3(0, 0, -currDistance) + Holder.position + cameraPos;
transform.rotation = rotation;
transform.position = position;
}
else
{
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
}
if (prevDistance != currDistance)
{
prevDistance = currDistance;
var rot = Quaternion.Euler(y, x, 0);
var po = rot * new Vector3(0, 0, -currDistance) + Holder.position + cameraPos;
transform.rotation = rot;
transform.position = po;
}
}
static float ClampAngle(float angle, float min, float max)
{
if (angle < -360)
{
angle += 360;
}
if (angle > 360)
{
angle -= 360;
}
return Mathf.Clamp(angle, min, max);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a586cf93dc19b28488308d7488b8de20
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: