terrible looking placeholder for firework
This commit is contained in:
parent
fb945db872
commit
dd87fd6d0a
11 changed files with 3263 additions and 0 deletions
8
Assets/_Project/Art/VFX/spells.meta
Normal file
8
Assets/_Project/Art/VFX/spells.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 204a6f4885c16648c8bd80385fcbe93f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
133
Assets/_Project/Art/VFX/spells/Fireball.prefab
Normal file
133
Assets/_Project/Art/VFX/spells/Fireball.prefab
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &158073311046191680
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7644069561715729860}
|
||||
- component: {fileID: 4501491015215836543}
|
||||
- component: {fileID: 4205765680785243152}
|
||||
- component: {fileID: 8766422769305713616}
|
||||
m_Layer: 0
|
||||
m_Name: Fireball
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7644069561715729860
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 158073311046191680}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -53.04094, y: 0, z: -31.13852}
|
||||
m_LocalScale: {x: 5, y: 5, z: 5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &4501491015215836543
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 158073311046191680}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &4205765680785243152
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 158073311046191680}
|
||||
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: 94a6d1000bea4e36492489f6ab3d6349, 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!114 &8766422769305713616
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 158073311046191680}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 883bd1d14f70a623ea1b252cf7015a92, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::TD.VFX.FallFromSkyVisual
|
||||
dropHeight: 20
|
||||
duration: 0.5
|
||||
fallCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
fallAngleDegrees: 0
|
||||
fallDirection: {x: 0, y: 0, z: 1}
|
||||
7
Assets/_Project/Art/VFX/spells/Fireball.prefab.meta
Normal file
7
Assets/_Project/Art/VFX/spells/Fireball.prefab.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 80eaad6d0b024835482b64625b63053c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/_Project/Art/VFX/spells/FireballMaterial.mat
Normal file
137
Assets/_Project/Art/VFX/spells/FireballMaterial.mat
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5733238300184794208
|
||||
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: FireballMaterial
|
||||
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: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.6196744, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0.6196744, g: 0, 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/VFX/spells/FireballMaterial.mat.meta
Normal file
8
Assets/_Project/Art/VFX/spells/FireballMaterial.mat.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 94a6d1000bea4e36492489f6ab3d6349
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2692
Assets/_Project/Art/VFX/spells/VFX_fireball_impact.vfx
Normal file
2692
Assets/_Project/Art/VFX/spells/VFX_fireball_impact.vfx
Normal file
File diff suppressed because it is too large
Load diff
15
Assets/_Project/Art/VFX/spells/VFX_fireball_impact.vfx.meta
Normal file
15
Assets/_Project/Art/VFX/spells/VFX_fireball_impact.vfx.meta
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3fa4641e771cdd27880ed1185a588a83
|
||||
VisualEffectImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
template:
|
||||
name:
|
||||
category:
|
||||
description:
|
||||
icon: {instanceID: 0}
|
||||
thumbnail: {instanceID: 0}
|
||||
useAsTemplate: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -21,4 +21,6 @@ MonoBehaviour:
|
|||
enemyLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1024
|
||||
impactVfxPrefab: {fileID: 158073311046191680, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
impactVfxLifetime: 2
|
||||
Damage: 50
|
||||
|
|
|
|||
|
|
@ -22163,6 +22163,124 @@ Mesh:
|
|||
- serializedVersion: 1
|
||||
m_IndexStart: 0
|
||||
m_IndexCount: 0
|
||||
--- !u!1 &1686616342
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1686616345}
|
||||
- component: {fileID: 1686616344}
|
||||
- component: {fileID: 1686616343}
|
||||
m_Layer: 0
|
||||
m_Name: VFX_fireball_impact
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!73398921 &1686616343
|
||||
VFXRenderer:
|
||||
serializedVersion: 1
|
||||
m_ObjectHideFlags: 2
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1686616342}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 0
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_RayTracingMode: 0
|
||||
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_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
|
||||
--- !u!2083052967 &1686616344
|
||||
VisualEffect:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1686616342}
|
||||
m_Enabled: 1
|
||||
m_Asset: {fileID: 8926484042661614526, guid: 3fa4641e771cdd27880ed1185a588a83, type: 3}
|
||||
m_InitialEventName: OnPlay
|
||||
m_InitialEventNameOverriden: 0
|
||||
m_StartSeed: 0
|
||||
m_ResetSeedOnPlay: 1
|
||||
m_AllowInstancing: 1
|
||||
m_ResourceVersion: 1
|
||||
m_PropertySheet:
|
||||
m_Float:
|
||||
m_Array: []
|
||||
m_Vector2f:
|
||||
m_Array: []
|
||||
m_Vector3f:
|
||||
m_Array: []
|
||||
m_Vector4f:
|
||||
m_Array: []
|
||||
m_Uint:
|
||||
m_Array: []
|
||||
m_Int:
|
||||
m_Array: []
|
||||
m_Matrix4x4f:
|
||||
m_Array: []
|
||||
m_AnimationCurve:
|
||||
m_Array: []
|
||||
m_Gradient:
|
||||
m_Array: []
|
||||
m_NamedObject:
|
||||
m_Array: []
|
||||
m_Bool:
|
||||
m_Array: []
|
||||
--- !u!4 &1686616345
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1686616342}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -18.90215, y: 6.17317, z: 0.5013}
|
||||
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!1 &1694718091
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -29037,6 +29155,63 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 1097152085}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &6610752177701459700
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 158073311046191680, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Fireball
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -53.04094
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -31.13852
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7644069561715729860, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 80eaad6d0b024835482b64625b63053c, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -29065,3 +29240,5 @@ SceneRoots:
|
|||
- {fileID: 2079088113}
|
||||
- {fileID: 914832726}
|
||||
- {fileID: 993870445}
|
||||
- {fileID: 1686616345}
|
||||
- {fileID: 6610752177701459700}
|
||||
|
|
|
|||
82
Assets/_Project/Scripts/VFX/FallFromSkyVisual.cs
Normal file
82
Assets/_Project/Scripts/VFX/FallFromSkyVisual.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
// Assets/_Project/Scripts/VFX/FallFromSkyVisual.cs
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TD.VFX
|
||||
{
|
||||
/// <summary>
|
||||
/// Animates this object falling from the sky down to its own spawn position. Intended for
|
||||
/// a one-shot placeholder VFX prefab (e.g. <c>FireballSpellDefinition.impactVfxPrefab</c>)
|
||||
/// that gets instantiated already at the correct landing point — on <c>Start</c>, it snaps
|
||||
/// itself up by <see cref="dropHeight"/> and animates back down over
|
||||
/// <see cref="duration"/> seconds.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Mirrors <see cref="TD.Combat.TowerLandingVisual"/>'s fall coroutine, minus the
|
||||
/// <c>TowerInstance</c> coupling — this is a plain local one-shot visual, not tied to any
|
||||
/// networked gameplay state, so it can run from <c>Start()</c> instead of waiting on a
|
||||
/// spawn event.
|
||||
/// </remarks>
|
||||
public class FallFromSkyVisual : MonoBehaviour
|
||||
{
|
||||
[Tooltip("How high above the landing point this object starts.")]
|
||||
[SerializeField] private float dropHeight = 20f;
|
||||
|
||||
[Tooltip("Seconds for the fall animation to complete.")]
|
||||
[Min(0.01f)]
|
||||
[SerializeField] private float duration = 0.5f;
|
||||
|
||||
[Tooltip("Eases the fall over Duration. X = normalized time, Y = normalized fraction " +
|
||||
"of DropHeight already descended (0 = still at drop height, 1 = landed).")]
|
||||
[SerializeField] private AnimationCurve fallCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
|
||||
|
||||
[Header("Angle (optional — 0 = straight down)")]
|
||||
[Tooltip("Angle from vertical, in degrees. 0 = falls straight down. Higher values = " +
|
||||
"a shallower, more meteor-like diagonal approach. Capped below 90 — at 90 the " +
|
||||
"object would never actually descend.")]
|
||||
[Range(0f, 80f)]
|
||||
[SerializeField] private float fallAngleDegrees = 0f;
|
||||
|
||||
[Tooltip("Horizontal direction the object travels as it falls (only used when " +
|
||||
"FallAngleDegrees > 0). Magnitude is ignored — normalized automatically.")]
|
||||
[SerializeField] private Vector3 fallDirection = Vector3.forward;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartCoroutine(AnimateDrop());
|
||||
}
|
||||
|
||||
private IEnumerator AnimateDrop()
|
||||
{
|
||||
Vector3 landedPosition = transform.position; // already correct — spawned at the target point
|
||||
|
||||
// Split dropHeight into a vertical component (unchanged from the straight-down case)
|
||||
// plus a horizontal component derived from the angle via basic trig: at angle θ from
|
||||
// vertical, horizontal distance = dropHeight * tan(θ). At θ = 0 this is 0, so the
|
||||
// whole angle path collapses back to the original straight-down offset.
|
||||
float angleRad = fallAngleDegrees * Mathf.Deg2Rad;
|
||||
float horizontalDistance = dropHeight * Mathf.Tan(angleRad);
|
||||
|
||||
// Only the horizontal (XZ) part of fallDirection matters — a Y component would just
|
||||
// be double-counting dropHeight, so it's dropped before normalizing.
|
||||
Vector3 flatDirection = new Vector3(fallDirection.x, 0f, fallDirection.z);
|
||||
Vector3 horizontalDir = flatDirection.sqrMagnitude > 0.0001f
|
||||
? flatDirection.normalized
|
||||
: Vector3.zero;
|
||||
|
||||
Vector3 startOffset = Vector3.up * dropHeight - horizontalDir * horizontalDistance;
|
||||
transform.position = landedPosition + startOffset;
|
||||
|
||||
float t = 0f;
|
||||
while (t < duration)
|
||||
{
|
||||
t += Time.deltaTime;
|
||||
float u = fallCurve.Evaluate(Mathf.Clamp01(t / duration));
|
||||
transform.position = landedPosition + startOffset * (1f - u);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
transform.position = landedPosition; // snap exactly, avoid float drift
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/_Project/Scripts/VFX/FallFromSkyVisual.cs.meta
Normal file
2
Assets/_Project/Scripts/VFX/FallFromSkyVisual.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 883bd1d14f70a623ea1b252cf7015a92
|
||||
Loading…
Add table
Add a link
Reference in a new issue