Compare commits
3 commits
7b93137216
...
b0cf9f619e
| Author | SHA1 | Date | |
|---|---|---|---|
| b0cf9f619e | |||
| 1afc78d64f | |||
| 699ea34268 |
23 changed files with 1351 additions and 55 deletions
|
|
@ -94,3 +94,8 @@ MonoBehaviour:
|
||||||
SourcePrefabToOverride: {fileID: 0}
|
SourcePrefabToOverride: {fileID: 0}
|
||||||
SourceHashToOverride: 0
|
SourceHashToOverride: 0
|
||||||
OverridingTargetPrefab: {fileID: 0}
|
OverridingTargetPrefab: {fileID: 0}
|
||||||
|
- Override: 0
|
||||||
|
Prefab: {fileID: 6482414459531823157, guid: 5a9e31f20d023e44dbd1c6d7dcdf4f71, type: 3}
|
||||||
|
SourcePrefabToOverride: {fileID: 0}
|
||||||
|
SourceHashToOverride: 0
|
||||||
|
OverridingTargetPrefab: {fileID: 0}
|
||||||
|
|
|
||||||
143
Assets/_Project/Art/Materials/M_Electrical_Glow.mat
Normal file
143
Assets/_Project/Art/Materials/M_Electrical_Glow.mat
Normal file
|
|
@ -0,0 +1,143 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-3745127967447924279
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: M_Electrical_Glow
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _EMISSION
|
||||||
|
- _SPECULAR_SETUP
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 2
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 1
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 1
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 0
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0.36320752, g: 0.43061623, b: 1, a: 1}
|
||||||
|
- _SpecColor: {r: 0.1764706, g: 0.1764706, b: 0.1764706, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
8
Assets/_Project/Art/Materials/M_Electrical_Glow.mat.meta
Normal file
8
Assets/_Project/Art/Materials/M_Electrical_Glow.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9ba610475fb3d4c4fa1245e15a72aee5
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
137
Assets/_Project/Art/Materials/M_Metal_Bronze.mat
Normal file
137
Assets/_Project/Art/Materials/M_Metal_Bronze.mat
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-935996532353526960
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: M_Metal_Bronze
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 1
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.677
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.6132076, g: 0.26755944, b: 0, a: 1}
|
||||||
|
- _Color: {r: 0.6132076, g: 0.2675594, b: 0, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
8
Assets/_Project/Art/Materials/M_Metal_Bronze.mat.meta
Normal file
8
Assets/_Project/Art/Materials/M_Metal_Bronze.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 48c188cfe6c7b8f41865979202b09f66
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
137
Assets/_Project/Art/Materials/M_Metal_Iron.mat
Normal file
137
Assets/_Project/Art/Materials/M_Metal_Iron.mat
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-3766760622661600496
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: M_Metal_Iron
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 1
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.677
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
8
Assets/_Project/Art/Materials/M_Metal_Iron.mat.meta
Normal file
8
Assets/_Project/Art/Materials/M_Metal_Iron.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 43a7de81dc971be4bab78e201f3844ca
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/_Project/Art/Models/Towers.meta
Normal file
8
Assets/_Project/Art/Models/Towers.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3e9605d1aa6c34c4a9baa9fec704a870
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
195
Assets/_Project/Art/Models/Towers/Mesh_TeslaTower.asset
Normal file
195
Assets/_Project/Art/Models/Towers/Mesh_TeslaTower.asset
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8779a537cbf0e93409b3b547fc612f7c
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 4300000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8c2d6e4f1a9b4c73d05e8f1a2b6c9d40, type: 3}
|
||||||
|
m_Name: Draft_NewTower_TeslaCoil
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.NewTowerDraftOption
|
||||||
|
DisplayName: Tesla Coil
|
||||||
|
Description: Add the Tesla Coil to your arsenal. Zaps all enemies in a short range
|
||||||
|
at once.
|
||||||
|
Icon: {fileID: 0}
|
||||||
|
Weight: 1
|
||||||
|
Tower: {fileID: 11400000, guid: e3f1a9c2b5d84e76a0c3f1e8d27b4905, type: 2}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f4a2b8d1c6e93f05a7b2d4c8e1f6a930
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
39
Assets/_Project/Definitions/Towers/TeslaCoilTower.asset
Normal file
39
Assets/_Project/Definitions/Towers/TeslaCoilTower.asset
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7b353a757b6e6774d97e6fb8ba138fcc, type: 3}
|
||||||
|
m_Name: TeslaCoilTower
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Towers.TowerDefinition
|
||||||
|
DisplayName: Tesla Coil Tower
|
||||||
|
Description: Zaps every enemy within its short range at once with electric arcs.
|
||||||
|
Rapid, low per-hit damage; targets ground and air.
|
||||||
|
FootprintSize: {x: 2, y: 2}
|
||||||
|
GoldCost: 40
|
||||||
|
BuildTime: 0.5
|
||||||
|
TowerPrefab: {fileID: 6482414459531823157, guid: 5a9e31f20d023e44dbd1c6d7dcdf4f71, type: 3}
|
||||||
|
ConstructionPhases: {fileID: 0}
|
||||||
|
Icon: {fileID: 0}
|
||||||
|
DamageType: 6
|
||||||
|
TargetPriority: 0
|
||||||
|
TargetType: 3
|
||||||
|
GroundedOnly: 0
|
||||||
|
Damage: 5
|
||||||
|
Range: 10
|
||||||
|
FireRate: 2
|
||||||
|
SplashRadius: 0
|
||||||
|
ChainCount: 0
|
||||||
|
ChainRange: 0
|
||||||
|
SlowFactor: 0
|
||||||
|
DotDamagePerSecond: 0
|
||||||
|
EffectDuration: 0
|
||||||
|
ProjectilePrefab: {fileID: 0}
|
||||||
|
ProjectileSpeed: 0
|
||||||
|
UpgradePaths: []
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e3f1a9c2b5d84e76a0c3f1e8d27b4905
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
398
Assets/_Project/Prefabs/Towers/Tower_TeslaCoil.prefab
Normal file
398
Assets/_Project/Prefabs/Towers/Tower_TeslaCoil.prefab
Normal file
|
|
@ -0,0 +1,398 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &39352475684176306
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5753294230586596248}
|
||||||
|
- component: {fileID: 5360241685303413176}
|
||||||
|
m_Layer: 8
|
||||||
|
m_Name: SelectionVolume
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &5753294230586596248
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 39352475684176306}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.5, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1283036264165444500}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!65 &5360241685303413176
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 39352475684176306}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 2, y: 1, z: 2}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &5555487747732705634
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1088221722203278382}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EmitterLocation
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1088221722203278382
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5555487747732705634}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 1.3, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1283036264165444500}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &6482414459531823157
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1283036264165444500}
|
||||||
|
- component: {fileID: 6869333096494165105}
|
||||||
|
- component: {fileID: 7630870068340451557}
|
||||||
|
- component: {fileID: 9137031893466587143}
|
||||||
|
- component: {fileID: 805962841523123163}
|
||||||
|
- component: {fileID: 8853488620519990682}
|
||||||
|
- component: {fileID: 4524938955752569428}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Tower_TeslaCoil
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1283036264165444500
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
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:
|
||||||
|
- {fileID: 5753294230586596248}
|
||||||
|
- {fileID: 7547850274173754846}
|
||||||
|
- {fileID: 7158970167016586489}
|
||||||
|
- {fileID: 1088221722203278382}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &6869333096494165105
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Mesh: {fileID: 4300000, guid: 8779a537cbf0e93409b3b547fc612f7c, type: 2}
|
||||||
|
--- !u!114 &7630870068340451557
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||||
|
GlobalObjectIdHash: 1363936954
|
||||||
|
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||||
|
DeferredDespawnTick: 0
|
||||||
|
Ownership: 1
|
||||||
|
AlwaysReplicateAsRoot: 0
|
||||||
|
SynchronizeTransform: 1
|
||||||
|
ActiveSceneSynchronization: 0
|
||||||
|
SceneMigrationSynchronization: 0
|
||||||
|
SpawnWithObservers: 1
|
||||||
|
DontDestroyWithOwner: 0
|
||||||
|
AutoObjectParentSync: 1
|
||||||
|
SyncOwnerTransformWhenParented: 1
|
||||||
|
AllowOwnerToParent: 0
|
||||||
|
--- !u!114 &9137031893466587143
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fb111fc88b3d6a340a3abde5a1502af3, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.TowerInstance
|
||||||
|
ShowTopMostFoldoutHeaderGroup: 1
|
||||||
|
tintedRenderers:
|
||||||
|
- {fileID: 0}
|
||||||
|
--- !u!114 &805962841523123163
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7eb6cce6cd96b23478b7d2173cebf74d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TowerCombat
|
||||||
|
ShowTopMostFoldoutHeaderGroup: 1
|
||||||
|
enemyLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 1024
|
||||||
|
--- !u!114 &8853488620519990682
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: c0edb0c5206ca454bbd7c300c6cc7574, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TowerRangeIndicator
|
||||||
|
rangeProjector: {fileID: 8255517343120954594}
|
||||||
|
projectionDepth: 50
|
||||||
|
--- !u!114 &4524938955752569428
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6482414459531823157}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a7c3e1f95b2d4068b1a9c4e7f2d50b83, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TeslaArcVisual
|
||||||
|
emitter: {fileID: 1088221722203278382}
|
||||||
|
arcMaterial: {fileID: 2100000, guid: 9ba610475fb3d4c4fa1245e15a72aee5, type: 2}
|
||||||
|
arcColor: {r: 0.6, g: 0.85, b: 1, a: 1}
|
||||||
|
arcWidth: 0.06
|
||||||
|
arcDuration: 0.12
|
||||||
|
segmentsPerArc: 6
|
||||||
|
jitter: 0.2
|
||||||
|
--- !u!1 &7101790219931971190
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7158970167016586489}
|
||||||
|
- component: {fileID: 8483068905520245286}
|
||||||
|
- component: {fileID: 4894823604936447762}
|
||||||
|
- component: {fileID: 3197617762217759550}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Mesh_TeslaTower
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7158970167016586489
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7101790219931971190}
|
||||||
|
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: 1283036264165444500}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &8483068905520245286
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7101790219931971190}
|
||||||
|
m_Mesh: {fileID: 4300000, guid: 8779a537cbf0e93409b3b547fc612f7c, type: 2}
|
||||||
|
--- !u!23 &4894823604936447762
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7101790219931971190}
|
||||||
|
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 43a7de81dc971be4bab78e201f3844ca, type: 2}
|
||||||
|
- {fileID: 2100000, guid: 48c188cfe6c7b8f41865979202b09f66, 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_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &3197617762217759550
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7101790219931971190}
|
||||||
|
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: 2, y: 1.625, z: 2}
|
||||||
|
m_Center: {x: 0, y: 0.8125, z: 0}
|
||||||
|
--- !u!1 &7580197837852108944
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7547850274173754846}
|
||||||
|
- component: {fileID: 8255517343120954594}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RangeIndicator
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7547850274173754846
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7580197837852108944}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1283036264165444500}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &8255517343120954594
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7580197837852108944}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0777d029ed3dffa4692f417d4aba19ca, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.DecalProjector
|
||||||
|
m_Material: {fileID: 2100000, guid: f99227cbde481ce47a2527e6bca709d2, type: 2}
|
||||||
|
m_DrawDistance: 1000
|
||||||
|
m_FadeScale: 0.9
|
||||||
|
m_StartAngleFade: 180
|
||||||
|
m_EndAngleFade: 180
|
||||||
|
m_UVScale: {x: 1, y: 1}
|
||||||
|
m_UVBias: {x: 0, y: 0}
|
||||||
|
m_RenderingLayerMask:
|
||||||
|
serializedVersion: 0
|
||||||
|
m_Bits: 1
|
||||||
|
m_ScaleMode: 0
|
||||||
|
m_Offset: {x: 0, y: 0, z: 0.5}
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_FadeFactor: 1
|
||||||
|
m_VisibleInScene: 1
|
||||||
|
version: 1
|
||||||
|
m_DecalLayerMask: 1
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5a9e31f20d023e44dbd1c6d7dcdf4f71
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -19774,7 +19774,9 @@ MonoBehaviour:
|
||||||
- {fileID: 11400000, guid: d5b2e8fa3c7e9b5f4a1d0c2e7f6b3a91, type: 2}
|
- {fileID: 11400000, guid: d5b2e8fa3c7e9b5f4a1d0c2e7f6b3a91, type: 2}
|
||||||
- {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
|
- {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
|
||||||
- {fileID: 11400000, guid: 04219895bbea4fb9a94fd62fef35bf2a, type: 2}
|
- {fileID: 11400000, guid: 04219895bbea4fb9a94fd62fef35bf2a, type: 2}
|
||||||
|
- {fileID: 11400000, guid: e3f1a9c2b5d84e76a0c3f1e8d27b4905, type: 2}
|
||||||
startingDeck:
|
startingDeck:
|
||||||
|
- {fileID: 11400000, guid: d5b2e8fa3c7e9b5f4a1d0c2e7f6b3a91, type: 2}
|
||||||
- {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
|
- {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
|
||||||
--- !u!4 &1507514109
|
--- !u!4 &1507514109
|
||||||
Transform:
|
Transform:
|
||||||
|
|
@ -19861,54 +19863,6 @@ BoxCollider:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Size: {x: 33, y: 1, z: 17}
|
m_Size: {x: 33, y: 1, z: 17}
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1538763653
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1538763654}
|
|
||||||
- component: {fileID: 1538763655}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: TowerRegistry
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1538763654
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1538763653}
|
|
||||||
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!114 &1538763655
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1538763653}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: a9dc0fbbe4422bc479ab8db7658c082b, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.TowerRegistry
|
|
||||||
definitions:
|
|
||||||
- {fileID: 11400000, guid: d5b2e8fa3c7e9b5f4a1d0c2e7f6b3a91, type: 2}
|
|
||||||
- {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
|
|
||||||
- {fileID: 11400000, guid: 04219895bbea4fb9a94fd62fef35bf2a, type: 2}
|
|
||||||
--- !u!1 &1547583984
|
--- !u!1 &1547583984
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -28414,7 +28368,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.DraftPool
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.DraftPool
|
||||||
options:
|
options:
|
||||||
- {fileID: 11400000, guid: 6b1d3f8a2c5e4097b8a1d0c3e6f9b240, type: 2}
|
- {fileID: 11400000, guid: 6b1d3f8a2c5e4097b8a1d0c3e6f9b240, type: 2}
|
||||||
- {fileID: 11400000, guid: 7c2e4a9b3d6f51a80c9b2e1d4f7a3b51, type: 2}
|
- {fileID: 11400000, guid: f4a2b8d1c6e93f05a7b2d4c8e1f6a930, type: 2}
|
||||||
--- !u!4 &2139601601
|
--- !u!4 &2139601601
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -28795,7 +28749,6 @@ SceneRoots:
|
||||||
- {fileID: 441239881}
|
- {fileID: 441239881}
|
||||||
- {fileID: 167151709}
|
- {fileID: 167151709}
|
||||||
- {fileID: 1507514109}
|
- {fileID: 1507514109}
|
||||||
- {fileID: 1538763654}
|
|
||||||
- {fileID: 1597884409}
|
- {fileID: 1597884409}
|
||||||
- {fileID: 1239994224}
|
- {fileID: 1239994224}
|
||||||
- {fileID: 1222526238}
|
- {fileID: 1222526238}
|
||||||
|
|
|
||||||
118
Assets/_Project/Scripts/Combat/TeslaArcVisual.cs
Normal file
118
Assets/_Project/Scripts/Combat/TeslaArcVisual.cs
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
// Assets/_Project/Scripts/Combat/TeslaArcVisual.cs
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace TD.Combat
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Local-only electrical-arc visual for <see cref="TD.Core.TargetType.AllInRange"/>
|
||||||
|
/// towers (Tesla Coil). Subscribes to <see cref="TowerCombat.OnAreaFired"/> and draws a
|
||||||
|
/// jagged line from the tower's emitter point to every enemy hit, flashed for a moment.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Pure visualization — runs on every peer from the replicated fire broadcast; nothing
|
||||||
|
/// here is networked. Arcs are pooled <see cref="LineRenderer"/>s reused across ticks.
|
||||||
|
/// </remarks>
|
||||||
|
[RequireComponent(typeof(TowerCombat))]
|
||||||
|
public class TeslaArcVisual : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Tooltip("Point the arcs originate from — the central top of the coil. " +
|
||||||
|
"If unset, falls back to one unit above the tower root.")]
|
||||||
|
[SerializeField] private Transform emitter;
|
||||||
|
|
||||||
|
[Tooltip("Material for the arc lines. Assign an unlit/additive material for a glow. " +
|
||||||
|
"If unset, a fallback Sprites/Default material is created at runtime.")]
|
||||||
|
[SerializeField] private Material arcMaterial;
|
||||||
|
|
||||||
|
[SerializeField] private Color arcColor = new Color(0.6f, 0.85f, 1f, 1f);
|
||||||
|
[SerializeField] private float arcWidth = 0.06f;
|
||||||
|
[Tooltip("How long each arc flash stays visible, in seconds.")]
|
||||||
|
[SerializeField] private float arcDuration = 0.12f;
|
||||||
|
[Tooltip("Number of points per arc. More = more jagged detail.")]
|
||||||
|
[SerializeField] private int segmentsPerArc = 6;
|
||||||
|
[Tooltip("Random offset applied to interior arc points for the lightning look.")]
|
||||||
|
[SerializeField] private float jitter = 0.2f;
|
||||||
|
|
||||||
|
private TowerCombat combat;
|
||||||
|
private readonly List<LineRenderer> pool = new List<LineRenderer>();
|
||||||
|
private float hideAt = -1f;
|
||||||
|
|
||||||
|
private void Awake() => combat = GetComponent<TowerCombat>();
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
if (combat != null) combat.OnAreaFired += HandleAreaFired;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
if (combat != null) combat.OnAreaFired -= HandleAreaFired;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (hideAt >= 0f && Time.time >= hideAt)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < pool.Count; i++) pool[i].enabled = false;
|
||||||
|
hideAt = -1f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleAreaFired(Vector3[] positions)
|
||||||
|
{
|
||||||
|
if (positions == null) return;
|
||||||
|
|
||||||
|
Vector3 origin = emitter != null ? emitter.position : transform.position + Vector3.up;
|
||||||
|
|
||||||
|
for (int i = 0; i < positions.Length; i++)
|
||||||
|
{
|
||||||
|
var lr = GetLine(i);
|
||||||
|
DrawArc(lr, origin, positions[i]);
|
||||||
|
lr.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable any leftover lines from a previous, larger tick.
|
||||||
|
for (int i = positions.Length; i < pool.Count; i++)
|
||||||
|
pool[i].enabled = false;
|
||||||
|
|
||||||
|
hideAt = Time.time + arcDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LineRenderer GetLine(int index)
|
||||||
|
{
|
||||||
|
while (pool.Count <= index)
|
||||||
|
{
|
||||||
|
var go = new GameObject($"Arc_{pool.Count}");
|
||||||
|
go.transform.SetParent(transform, worldPositionStays: false);
|
||||||
|
var lr = go.AddComponent<LineRenderer>();
|
||||||
|
lr.useWorldSpace = true;
|
||||||
|
lr.widthMultiplier = arcWidth;
|
||||||
|
lr.numCapVertices = 2;
|
||||||
|
lr.textureMode = LineTextureMode.Stretch;
|
||||||
|
lr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
|
||||||
|
lr.material = arcMaterial != null
|
||||||
|
? arcMaterial
|
||||||
|
: new Material(Shader.Find("Sprites/Default"));
|
||||||
|
lr.startColor = lr.endColor = arcColor;
|
||||||
|
lr.enabled = false;
|
||||||
|
pool.Add(lr);
|
||||||
|
}
|
||||||
|
return pool[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawArc(LineRenderer lr, Vector3 a, Vector3 b)
|
||||||
|
{
|
||||||
|
int n = Mathf.Max(2, segmentsPerArc);
|
||||||
|
lr.positionCount = n;
|
||||||
|
for (int s = 0; s < n; s++)
|
||||||
|
{
|
||||||
|
float t = s / (float)(n - 1);
|
||||||
|
Vector3 p = Vector3.Lerp(a, b, t);
|
||||||
|
// Jitter interior points only — endpoints stay anchored to the coil and enemy.
|
||||||
|
if (s != 0 && s != n - 1)
|
||||||
|
p += Random.insideUnitSphere * jitter;
|
||||||
|
lr.SetPosition(s, p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/_Project/Scripts/Combat/TeslaArcVisual.cs.meta
Normal file
11
Assets/_Project/Scripts/Combat/TeslaArcVisual.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a7c3e1f95b2d4068b1a9c4e7f2d50b83
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -90,6 +90,13 @@ namespace TD.Combat
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<Vector3> OnFire;
|
public event Action<Vector3> OnFire;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fired locally on ALL peers when an <see cref="TargetType.AllInRange"/> tower
|
||||||
|
/// attacks, carrying the world positions of every enemy hit this tick. A visual
|
||||||
|
/// component (e.g. <c>TeslaArcVisual</c>) subscribes to draw an arc to each.
|
||||||
|
/// </summary>
|
||||||
|
public event Action<Vector3[]> OnAreaFired;
|
||||||
|
|
||||||
// ----- NGO lifecycle -----------------------------------------------
|
// ----- NGO lifecycle -----------------------------------------------
|
||||||
|
|
||||||
public override void OnNetworkSpawn()
|
public override void OnNetworkSpawn()
|
||||||
|
|
@ -300,10 +307,14 @@ namespace TD.Combat
|
||||||
public readonly float ProjectileSpeed;
|
public readonly float ProjectileSpeed;
|
||||||
public readonly int ChainCount;
|
public readonly int ChainCount;
|
||||||
public readonly float ChainRange;
|
public readonly float ChainRange;
|
||||||
|
// The tower's attack range. Carried here so the AllInRange path knows how far
|
||||||
|
// to sweep without re-reading the TowerDefinition.
|
||||||
|
public readonly float Range;
|
||||||
|
|
||||||
public CombatProfile(float damage, DamageType damageType, TargetType targetType,
|
public CombatProfile(float damage, DamageType damageType, TargetType targetType,
|
||||||
float splashRadius, float slowFactor, float dotDamagePerSecond,
|
float splashRadius, float slowFactor, float dotDamagePerSecond,
|
||||||
float effectDuration, float projectileSpeed, int chainCount, float chainRange)
|
float effectDuration, float projectileSpeed, int chainCount, float chainRange,
|
||||||
|
float range)
|
||||||
{
|
{
|
||||||
Damage = damage;
|
Damage = damage;
|
||||||
DamageType = damageType;
|
DamageType = damageType;
|
||||||
|
|
@ -315,6 +326,7 @@ namespace TD.Combat
|
||||||
ProjectileSpeed = projectileSpeed;
|
ProjectileSpeed = projectileSpeed;
|
||||||
ChainCount = chainCount;
|
ChainCount = chainCount;
|
||||||
ChainRange = chainRange;
|
ChainRange = chainRange;
|
||||||
|
Range = range;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,7 +366,8 @@ namespace TD.Combat
|
||||||
}
|
}
|
||||||
|
|
||||||
return new CombatProfile(damage, damageType, targetType, splash, slow, dot,
|
return new CombatProfile(damage, damageType, targetType, splash, slow, dot,
|
||||||
duration, def.ProjectileSpeed, def.ChainCount, def.ChainRange);
|
duration, def.ProjectileSpeed, def.ChainCount, def.ChainRange,
|
||||||
|
def.Range);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- Damage application ------------------------------------------
|
// ----- Damage application ------------------------------------------
|
||||||
|
|
@ -377,9 +390,33 @@ namespace TD.Combat
|
||||||
case TargetType.Chain:
|
case TargetType.Chain:
|
||||||
ApplyChain(p, primary, owner);
|
ApplyChain(p, primary, owner);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TargetType.AllInRange:
|
||||||
|
ApplyAllInRange(p, owner);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hits every enemy within the tower's range this tick (Tesla Coil). Broadcasts the
|
||||||
|
// hit positions so a visual component can draw an arc to each.
|
||||||
|
private void ApplyAllInRange(in CombatProfile p, PlayerSlot owner)
|
||||||
|
{
|
||||||
|
int count = Physics.OverlapSphereNonAlloc(
|
||||||
|
transform.position, p.Range, s_overlapBuffer, enemyLayerMask);
|
||||||
|
|
||||||
|
var hitPositions = new List<Vector3>(count);
|
||||||
|
for (int i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var eh = s_overlapBuffer[i].GetComponent<EnemyHealth>();
|
||||||
|
if (eh == null || eh.IsDead) continue;
|
||||||
|
HitEnemy(p, eh, owner);
|
||||||
|
hitPositions.Add(eh.transform.position);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hitPositions.Count > 0)
|
||||||
|
AreaFiredClientRpc(hitPositions.ToArray());
|
||||||
|
}
|
||||||
|
|
||||||
private void ApplySplash(in CombatProfile p, EnemyHealth primary,
|
private void ApplySplash(in CombatProfile p, EnemyHealth primary,
|
||||||
Vector3 origin, PlayerSlot owner)
|
Vector3 origin, PlayerSlot owner)
|
||||||
{
|
{
|
||||||
|
|
@ -513,6 +550,14 @@ namespace TD.Combat
|
||||||
// and draw a line renderer through these world positions.
|
// and draw a line renderer through these world positions.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ClientRpc]
|
||||||
|
private void AreaFiredClientRpc(Vector3[] hitPositions)
|
||||||
|
{
|
||||||
|
// Visual consumers (TeslaArcVisual) subscribe to OnAreaFired to draw an
|
||||||
|
// electrical arc from the tower's emitter to each hit enemy.
|
||||||
|
OnAreaFired?.Invoke(hitPositions);
|
||||||
|
}
|
||||||
|
|
||||||
// ----- NV callback (fires on all peers) ----------------------------
|
// ----- NV callback (fires on all peers) ----------------------------
|
||||||
|
|
||||||
private void HandleReplicatedTargetChanged(
|
private void HandleReplicatedTargetChanged(
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace TD.Core
|
||||||
Fire = 3,
|
Fire = 3,
|
||||||
Poison = 4,
|
Poison = 4,
|
||||||
Holy = 5,
|
Holy = 5,
|
||||||
|
Electric = 6,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -40,6 +41,9 @@ namespace TD.Core
|
||||||
Splash = 1,
|
Splash = 1,
|
||||||
/// <summary>Chains damage to up to ChainCount additional nearby enemies.</summary>
|
/// <summary>Chains damage to up to ChainCount additional nearby enemies.</summary>
|
||||||
Chain = 2,
|
Chain = 2,
|
||||||
|
/// <summary>Hits EVERY enemy within the tower's Range each attack (e.g. Tesla Coil).
|
||||||
|
/// Hitscan only — pairs with a null ProjectilePrefab.</summary>
|
||||||
|
AllInRange = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -601,9 +601,9 @@ namespace TD.Gameplay
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 spawnPos = GridCoordinates.GetFootprintCenterWorld(anchor, def.FootprintSize);
|
Vector3 spawnPos = GridCoordinates.GetFootprintCenterWorld(anchor, def.FootprintSize);
|
||||||
// Towers sit on the buildable plane (Y=0); raise slightly so the mesh base
|
// Place on the buildable plane (Y=0); SeatOnGround below corrects the final Y
|
||||||
// sits flush rather than half-clipped. A cube of scale 1 needs +0.5 on Y.
|
// from the mesh bounds so the tower rests flush regardless of its pivot.
|
||||||
spawnPos.y = 0.5f;
|
spawnPos.y = 0f;
|
||||||
|
|
||||||
var go = Instantiate(def.TowerPrefab, spawnPos, Quaternion.identity);
|
var go = Instantiate(def.TowerPrefab, spawnPos, Quaternion.identity);
|
||||||
var instance = go.GetComponent<TowerInstance>();
|
var instance = go.GetComponent<TowerInstance>();
|
||||||
|
|
@ -626,9 +626,32 @@ namespace TD.Gameplay
|
||||||
Destroy(go);
|
Destroy(go);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Seat the tower flush on the ground from its mesh bounds — BEFORE Spawn so the
|
||||||
|
// corrected transform is captured in the spawn sync. Handles any pivot.
|
||||||
|
SeatOnGround(go, groundY: 0f);
|
||||||
|
|
||||||
netObj.Spawn(destroyWithScene: true);
|
netObj.Spawn(destroyWithScene: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shifts <paramref name="go"/> vertically so the lowest point of its combined
|
||||||
|
/// renderer bounds rests at <paramref name="groundY"/>. Lets towers be authored with
|
||||||
|
/// any mesh pivot (center, base, etc.) and still sit flush on the ground — no
|
||||||
|
/// per-prefab Y tweaking. No-op if the prefab has no renderers.
|
||||||
|
/// </summary>
|
||||||
|
private static void SeatOnGround(GameObject go, float groundY)
|
||||||
|
{
|
||||||
|
var renderers = go.GetComponentsInChildren<Renderer>();
|
||||||
|
if (renderers.Length == 0) return;
|
||||||
|
|
||||||
|
Bounds b = renderers[0].bounds;
|
||||||
|
for (int i = 1; i < renderers.Length; i++)
|
||||||
|
b.Encapsulate(renderers[i].bounds);
|
||||||
|
|
||||||
|
go.transform.position += Vector3.up * (groundY - b.min.y);
|
||||||
|
}
|
||||||
|
|
||||||
// ----- Utility ----------------------------------------------------
|
// ----- Utility ----------------------------------------------------
|
||||||
|
|
||||||
private static bool TryGetDefinition(int typeId, out TowerDefinition def)
|
private static bool TryGetDefinition(int typeId, out TowerDefinition def)
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,11 @@
|
||||||
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "editor.dragSelectRectMode",
|
"key": "editor.dragSelectRectMode",
|
||||||
"value": "{\"m_Value\":0}"
|
"value": "{\"m_Value\":0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEditor.ProBuilder.Actions.ExportAssetOptions, Unity.ProBuilder.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "export.assetOptions",
|
||||||
|
"value": "{\"m_Value\":{\"makePrefab\":false,\"replaceOriginal\":false}}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue