添加指引系统,退出APP功能,安徽宿州砀山古城商业街苏州场景
This commit is contained in:
351
Assets/DC/地形/安徽苏州.prefab
Normal file
351
Assets/DC/地形/安徽苏州.prefab
Normal 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}
|
||||
7
Assets/DC/地形/安徽苏州.prefab.meta
Normal file
7
Assets/DC/地形/安徽苏州.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23d92bcafd23cd84c80d578f742aa637
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Magic_Spline.meta
Normal file
8
Assets/Magic_Spline.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bf5d6cbffb27984abed6ca5fd38a4d1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Magic_Spline/Texture.meta
Normal file
8
Assets/Magic_Spline/Texture.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7ecf9012c86ef24c8e7ce87f35ba420
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Magic_Spline/Texture/FX_Arrow_7_00006.png
Normal file
BIN
Assets/Magic_Spline/Texture/FX_Arrow_7_00006.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
140
Assets/Magic_Spline/Texture/FX_Arrow_7_00006.png.meta
Normal file
140
Assets/Magic_Spline/Texture/FX_Arrow_7_00006.png.meta
Normal 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:
|
||||
@@ -1,31 +1,21 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
namespace PilotoStudio
|
||||
|
||||
public class Rotator : MonoBehaviour
|
||||
{
|
||||
public class Rotator : MonoBehaviour
|
||||
{
|
||||
public float x = 0f;
|
||||
public float y = 0f;
|
||||
public float z = 0f;
|
||||
|
||||
public bool useGlobal;
|
||||
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!useGlobal)
|
||||
{
|
||||
this.transform.Rotate(new Vector3(x, y, z) * Time.deltaTime);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.transform.Rotate(new Vector3(x, y, z) * Time.deltaTime, Space.Self);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,3 +95,5 @@ MonoBehaviour:
|
||||
allPlayers: []
|
||||
settleData:
|
||||
gameState: 0
|
||||
GuideArrowPre: {fileID: 718552219040796497, guid: 1090ff9efb8eaa94cbdc6dfa4042d3b7,
|
||||
type: 3}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40335,7 +40335,7 @@ MonoBehaviour:
|
||||
IncludeChildColliders: 0
|
||||
RuntimeFollower: {fileID: 0}
|
||||
colliderMaxDistance: 100
|
||||
lastTimeMaxDistanceCalced: 638999412584240770
|
||||
lastTimeMaxDistanceCalced: 639005412568278652
|
||||
--- !u!1001 &1803484949
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -4520,7 +4520,7 @@ Transform:
|
||||
m_GameObject: {fileID: 187548279}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 6.81, y: 0.1, z: 3.49}
|
||||
m_LocalPosition: {x: 7.49, y: 0.1, z: 1.56}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -4925,7 +4925,7 @@ Transform:
|
||||
m_GameObject: {fileID: 224353402}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 10.73, y: 10, z: -1.11}
|
||||
m_LocalPosition: {x: 10.3, y: 10, z: -0.43}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -5410,7 +5410,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8679921383154817045, guid: f98ab8abf74faba47915dfdc0f95f55b,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 10.41
|
||||
value: 9.41
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: f98ab8abf74faba47915dfdc0f95f55b,
|
||||
type: 3}
|
||||
@@ -5420,7 +5420,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8679921383154817045, guid: f98ab8abf74faba47915dfdc0f95f55b,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 15.86
|
||||
value: 16.86
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: f98ab8abf74faba47915dfdc0f95f55b,
|
||||
type: 3}
|
||||
@@ -13832,7 +13832,7 @@ Transform:
|
||||
m_GameObject: {fileID: 577434367}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 14.77, y: -4.032973, z: 20.72}
|
||||
m_LocalPosition: {x: 13.77, y: -4.032973, z: 21.72}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -16325,7 +16325,7 @@ Transform:
|
||||
m_GameObject: {fileID: 793806202}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 6.05, y: 10, z: -1.67}
|
||||
m_LocalPosition: {x: 4.61, y: 10, z: -0.44}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -26710,7 +26710,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1015762382}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 9.98, y: 10, z: 15.85}
|
||||
m_LocalPosition: {x: 9.28, y: 10, z: 18.9}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -26990,7 +26990,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1046302339}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 10.92, y: 0, z: 21.79}
|
||||
m_LocalPosition: {x: 9.92, y: 0, z: 22.79}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@@ -30426,7 +30426,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1249438065}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 6.77, y: 10, z: 15.21}
|
||||
m_LocalPosition: {x: 4.62, y: 10, z: 18.66}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -41674,7 +41674,7 @@ MonoBehaviour:
|
||||
IncludeChildColliders: 0
|
||||
RuntimeFollower: {fileID: 0}
|
||||
colliderMaxDistance: 100
|
||||
lastTimeMaxDistanceCalced: 638999455536035953
|
||||
lastTimeMaxDistanceCalced: 639005465778126621
|
||||
--- !u!1001 &1803484949
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -42266,7 +42266,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1840121649}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 6.67, y: 0.1, z: 13.080001}
|
||||
m_LocalPosition: {x: 6.67, y: 0.1, z: 13.94}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -44165,7 +44165,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1958196495}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 8.300001, y: 4.5, z: 7.5}
|
||||
m_LocalPosition: {x: 7.300001, y: 4.5, z: 8.5}
|
||||
m_LocalScale: {x: 4, y: 0.66622585, z: 3.9871316}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
@@ -44723,7 +44723,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2033158670}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 10.02, y: 0, z: 15.43}
|
||||
m_LocalPosition: {x: 9.02, y: 0, z: 16.43}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -276,6 +276,8 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
teamType = TeamType.Red;
|
||||
GameManager.Ins.GivePistol(index);
|
||||
GameManager.Ins.CheckGameStart();
|
||||
GameManager.Ins.CleanupGuideArrow();
|
||||
|
||||
}
|
||||
|
||||
if (other.tag == "BlueDoor")
|
||||
@@ -284,6 +286,8 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
teamType = TeamType.Blue;
|
||||
GameManager.Ins.GivePistol(index);
|
||||
GameManager.Ins.CheckGameStart();
|
||||
GameManager.Ins.CleanupGuideArrow();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -191,6 +191,12 @@ public class HUDPanel : MonoBehaviour
|
||||
if (roundIndex == 3)
|
||||
{
|
||||
GameEnd(blueScore, redScore);
|
||||
Debug.Log("游戏结束,5秒后退出");
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
Debug.Log("正在退出游戏...");
|
||||
Application.Quit();
|
||||
}, 5f);
|
||||
return;
|
||||
}
|
||||
MasterAudio.PlaySound("3.9");
|
||||
|
||||
8
Assets/_Valheim/Prefabs.meta
Normal file
8
Assets/_Valheim/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8bb26b118cc88e443bf430984bd7b57a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_Valheim/Prefabs/Pet.meta
Normal file
8
Assets/_Valheim/Prefabs/Pet.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2ef7877d91af0849828c16edc2a3230
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_Valheim/Prefabs/Pet/Player.meta
Normal file
8
Assets/_Valheim/Prefabs/Pet/Player.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41d8449cd6ef8c54aa48eeea20e43145
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
172
Assets/_Valheim/Prefabs/Pet/Player/PathGuide.prefab
Normal file
172
Assets/_Valheim/Prefabs/Pet/Player/PathGuide.prefab
Normal 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
|
||||
7
Assets/_Valheim/Prefabs/Pet/Player/PathGuide.prefab.meta
Normal file
7
Assets/_Valheim/Prefabs/Pet/Player/PathGuide.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1090ff9efb8eaa94cbdc6dfa4042d3b7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_Valheim/Scripts.meta
Normal file
8
Assets/_Valheim/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66f6b66cfef0a194cad6e74200e9f138
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_Valheim/Scripts/Player.meta
Normal file
8
Assets/_Valheim/Scripts/Player.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab89cc5a9acefa34db85ad4749b51af8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
102
Assets/_Valheim/Scripts/Player/GuideArrowPath.cs
Normal file
102
Assets/_Valheim/Scripts/Player/GuideArrowPath.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GuideArrowPath : MonoBehaviour
|
||||
{
|
||||
public LayerMask obstacleMask;
|
||||
public float pathHeight = 0.5f;
|
||||
|
||||
private LineRenderer lineRenderer;
|
||||
private bool isPathVisible = false;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// 从预制体上获取已存在的LineRenderer组件
|
||||
lineRenderer = GetComponent<LineRenderer>();
|
||||
if (lineRenderer == null)
|
||||
{
|
||||
Debug.LogError("LineRenderer组件未找到!请确保预制体上已挂载LineRenderer组件");
|
||||
return;
|
||||
}
|
||||
|
||||
// 预制体上已预设LineRenderer属性,这里不再动态设置
|
||||
// 如果需要在代码中覆盖预制体设置,可以取消注释以下代码
|
||||
/*
|
||||
lineRenderer.startWidth = 0.1f;
|
||||
lineRenderer.endWidth = 0.1f;
|
||||
lineRenderer.material = new Material(Shader.Find("Sprites/Default"));
|
||||
lineRenderer.startColor = Color.yellow;
|
||||
lineRenderer.endColor = Color.red;
|
||||
*/
|
||||
|
||||
lineRenderer.positionCount = 0;
|
||||
lineRenderer.enabled = false; // 初始禁用
|
||||
|
||||
Debug.Log("GuideArrowPath 初始化完成,LineRenderer: " + (lineRenderer != null));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置路径
|
||||
/// </summary>
|
||||
public void SetPath(List<Vector3> pathPoints)
|
||||
{
|
||||
if (lineRenderer == null)
|
||||
{
|
||||
Debug.LogError("LineRenderer 未找到!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pathPoints == null || pathPoints.Count < 2)
|
||||
{
|
||||
lineRenderer.positionCount = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// 调整路径点高度
|
||||
for (int i = 0; i < pathPoints.Count; i++)
|
||||
{
|
||||
pathPoints[i] = new Vector3(pathPoints[i].x, pathHeight, pathPoints[i].z);
|
||||
}
|
||||
|
||||
lineRenderer.positionCount = pathPoints.Count;
|
||||
lineRenderer.SetPositions(pathPoints.ToArray());
|
||||
|
||||
Debug.Log("设置路径,点数: " + pathPoints.Count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示路径
|
||||
/// </summary>
|
||||
public void ShowPath()
|
||||
{
|
||||
if (lineRenderer != null)
|
||||
{
|
||||
lineRenderer.enabled = true;
|
||||
isPathVisible = true;
|
||||
Debug.Log("显示路径,LineRenderer enabled: " + lineRenderer.enabled);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭路径
|
||||
/// </summary>
|
||||
public void ClosePath()
|
||||
{
|
||||
if (lineRenderer != null)
|
||||
{
|
||||
lineRenderer.enabled = false;
|
||||
isPathVisible = false;
|
||||
lineRenderer.positionCount = 0;
|
||||
Debug.Log("关闭路径");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查路径是否可见
|
||||
/// </summary>
|
||||
public bool IsPathVisible()
|
||||
{
|
||||
return isPathVisible && lineRenderer != null && lineRenderer.enabled;
|
||||
}
|
||||
}
|
||||
11
Assets/_Valheim/Scripts/Player/GuideArrowPath.cs.meta
Normal file
11
Assets/_Valheim/Scripts/Player/GuideArrowPath.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cdda35296b966646ada44468a5c40c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/sucai/Hovl Studio 1.meta
Normal file
8
Assets/sucai/Hovl Studio 1.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f252e080092ea5b4dbd7e2a8eb967313
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/sucai/Hovl Studio 1/RPG VFX pack.meta
Normal file
8
Assets/sucai/Hovl Studio 1/RPG VFX pack.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53b5a76f32635a84693329a01b1acca4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Demo scenes.meta
Normal file
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Demo scenes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de80eee5c30f2784f831e7698947df71
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f99c59b5e30a0bb489baddcf6f9b0b1f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,163 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization.Formatters;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraHolder : MonoBehaviour
|
||||
{
|
||||
//camera holder
|
||||
public Transform Holder;
|
||||
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;
|
||||
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;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b99cd4d7484b23488edaed430e3e34f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3115d000755584246bd1003ab175d238
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8525fc6b3b62e24e86a37b99d3aec83
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Materials.meta
Normal file
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15f8b14f0e14b3b45a32d03a8c2c8291
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d89e79b4cfdd0ae4e9a7b611c4b172b1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts.meta
Normal file
8
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f2f25f2d5435df42adb203274716f86
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a79ba5bb0b3780b4a98ce45e779b6441
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6af44eb64ff318b42a219a7abd31ff20
|
||||
timeCreated: 1536001444
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
115
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts/Hovl_Laser.cs
Normal file
115
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts/Hovl_Laser.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ea4308861e24ac4caa06d26e151d595
|
||||
timeCreated: 1536001444
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
146
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts/Hovl_Laser2.cs
Normal file
146
Assets/sucai/Hovl Studio 1/RPG VFX pack/Scripts/Hovl_Laser2.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7c107ae524aed749b3de3034023eb9d
|
||||
timeCreated: 1536001444
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
8
Assets/sucai/Hovl Studio/Resources/Scripts.meta
Normal file
8
Assets/sucai/Hovl Studio/Resources/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d8a41eea3de40a4cb6e2cfc61c3a558
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 640cf3e99f9a4a742bb7327f187b2e54
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a586cf93dc19b28488308d7488b8de20
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user