feat: changed FORGE3D Sci-Fi Effects to fit my needs better
This commit is contained in:
parent
7a3e0e0a69
commit
aff9e88a93
@ -25,12 +25,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 0, y: 0.000000019868, z: -0.32}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
--- !u!33 &3300002
|
||||
MeshFilter:
|
||||
@ -51,10 +52,12 @@ MeshRenderer:
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@ -79,6 +82,7 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &100004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -104,14 +108,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 3, y: 3, z: 3}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4000010027762468}
|
||||
- {fileID: 400002}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
@ -128,8 +133,11 @@ MonoBehaviour:
|
||||
fxType: 11
|
||||
layerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
lifeTime: 1
|
||||
m_Bits: 136
|
||||
Damage: 150
|
||||
BlastMagnitude: 100
|
||||
OwnerId: 0
|
||||
LifeTime: 5
|
||||
despawnDelay: 0
|
||||
velocity: 300
|
||||
RaycastAdvance: 2
|
||||
@ -178,12 +186,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1000010589384354}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0.000000019868, z: -0.32}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!33 &33000011791246272
|
||||
MeshFilter:
|
||||
@ -204,10 +213,12 @@ MeshRenderer:
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@ -232,3 +243,4 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
File diff suppressed because it is too large
Load Diff
@ -26,15 +26,17 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
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_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!120 &12000000
|
||||
LineRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@ -44,10 +46,12 @@ LineRenderer:
|
||||
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_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@ -129,16 +133,20 @@ LineRenderer:
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: -1
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
numCornerVertices: 0
|
||||
numCapVertices: 0
|
||||
alignment: 0
|
||||
textureMode: 0
|
||||
textureScale: {x: 1, y: 1}
|
||||
shadowBias: 0
|
||||
generateLightingData: 0
|
||||
m_MaskInteraction: 0
|
||||
m_UseWorldSpace: 0
|
||||
m_Loop: 0
|
||||
m_ApplyActiveColorSpace: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -153,9 +161,12 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
layerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Bits: 136
|
||||
Damage: 350
|
||||
BlastMagnitude: 350
|
||||
OwnerId: 0
|
||||
fxType: 5
|
||||
OneShot: 1
|
||||
OneShot: 0
|
||||
BeamFrames:
|
||||
- {fileID: 2800000, guid: 93d10af4c9d98aa48abb06818e0ab192, type: 3}
|
||||
- {fileID: 2800000, guid: ebe4a3a4b5a73e549b0a5fd41d68055b, type: 3}
|
||||
@ -5143,10 +5143,13 @@ MonoBehaviour:
|
||||
fxType: 4
|
||||
layerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 9
|
||||
lifeTime: 5
|
||||
m_Bits: 136
|
||||
Damage: 200
|
||||
BlastMagnitude: 200
|
||||
OwnerId: 0
|
||||
LifeTime: 5
|
||||
despawnDelay: 1
|
||||
velocity: 75
|
||||
velocity: 130
|
||||
RaycastAdvance: 2
|
||||
DelayDespawn: 1
|
||||
delayedParticles:
|
||||
|
||||
@ -25,12 +25,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.7987106}
|
||||
m_LocalScale: {x: 2.2, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0}
|
||||
--- !u!33 &3300000
|
||||
MeshFilter:
|
||||
@ -51,10 +52,12 @@ MeshRenderer:
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@ -79,6 +82,7 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &100002
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -104,12 +108,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: -0.5, z: 0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.7987106}
|
||||
m_LocalScale: {x: 2.2, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 90}
|
||||
--- !u!33 &3300002
|
||||
MeshFilter:
|
||||
@ -130,10 +135,12 @@ MeshRenderer:
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@ -158,6 +165,7 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &100004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -183,15 +191,16 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
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: 400002}
|
||||
- {fileID: 400000}
|
||||
- {fileID: 400006}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
@ -235,6 +244,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 400006}
|
||||
- component: {fileID: 10800000}
|
||||
- component: {fileID: 8317281421139234932}
|
||||
m_Layer: 0
|
||||
m_Name: Point light
|
||||
m_TagString: Untagged
|
||||
@ -249,12 +259,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.6052952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!108 &10800000
|
||||
Light:
|
||||
@ -315,5 +326,29 @@ Light:
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!114 &8317281421139234932
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_LightLayerMask: 1
|
||||
m_RenderingLayers: 1
|
||||
m_CustomShadowLayers: 0
|
||||
m_ShadowLayerMask: 1
|
||||
m_ShadowRenderingLayers: 1
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
m_SoftShadowQuality: 0
|
||||
|
||||
@ -1,5 +1,181 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &6391351660618341151
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 100008, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 100010, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: solo_gun_flare_trail Variant
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 0.94
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime1
|
||||
value: 2120
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime2
|
||||
value: 62837
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime3
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime4
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime5
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime6
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key2.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key3.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key4.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key5.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key6.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.m_NumAlphaKeys
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ShapeModule.enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ShapeModule.radius.value
|
||||
value: 0.09
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.scalar
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 0.94
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.b
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.g
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.r
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.gravityModifier.scalar
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800006, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 8.07
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: -8093627500212825932}
|
||||
- targetCorrespondingSourceObject: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 8214279908182662867}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
--- !u!1 &6391351660618440115 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
m_PrefabInstance: {fileID: 6391351660618341151}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &-8093627500212825932
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -15,8 +191,11 @@ MonoBehaviour:
|
||||
fxType: 1
|
||||
layerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
lifeTime: 2
|
||||
m_Bits: 136
|
||||
Damage: 200
|
||||
BlastMagnitude: 200
|
||||
OwnerId: 0
|
||||
LifeTime: 5
|
||||
despawnDelay: 0
|
||||
velocity: 200
|
||||
RaycastAdvance: 2
|
||||
@ -40,170 +219,3 @@ MonoBehaviour:
|
||||
MaxScale: 1.2
|
||||
MinRotation: -360
|
||||
MaxRotaion: 360
|
||||
--- !u!1001 &6391351660618341151
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 100008, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 100010, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: solo_gun_flare_trail Variant
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400012, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 0.94
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime2
|
||||
value: 62837
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key2.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key3.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key4.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key5.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.key6.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime3
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime4
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime5
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime6
|
||||
value: 65535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.m_NumAlphaKeys
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800002, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ColorModule.gradient.maxGradient.atime1
|
||||
value: 2120
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 0.94
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ShapeModule.enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: ShapeModule.radius.value
|
||||
value: 0.09
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.gravityModifier.scalar
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.r
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.g
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.b
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.scalar
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800004, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startColor.maxColor.a
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 19800006, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
propertyPath: InitialModule.startSize.minScalar
|
||||
value: 8.07
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 157253c33b5e2ae4c99dd92c193b5413, type: 3}
|
||||
--- !u!1 &6391351660618440115 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 100012, guid: 157253c33b5e2ae4c99dd92c193b5413,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 6391351660618341151}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
File diff suppressed because it is too large
Load Diff
@ -443,7 +443,7 @@ namespace FORGE3D
|
||||
}
|
||||
|
||||
// Play heavy plasma beam shot and loop audio at specific position
|
||||
public void PlasmaBeamHeavyLoop(Vector3 pos, Transform loopParent)
|
||||
public AudioSource PlasmaBeamHeavyLoop(Vector3 pos, Transform loopParent)
|
||||
{
|
||||
AudioSource aOpen =
|
||||
F3DPoolManager.Pools["GeneratedPool"].SpawnAudio(audioSource, plasmabeamHeavyOpen, pos, null)
|
||||
@ -468,6 +468,7 @@ namespace FORGE3D
|
||||
|
||||
aLoop.Play();
|
||||
}
|
||||
return aLoop;
|
||||
}
|
||||
|
||||
// Play heavy plasma beam closing audio at specific position
|
||||
|
||||
@ -8,67 +8,75 @@ namespace FORGE3D
|
||||
{
|
||||
public LayerMask layerMask;
|
||||
|
||||
public F3DFXType fxType; // Weapon type
|
||||
public bool OneShot; // Constant or single beam?
|
||||
[Tooltip("The amount of damage this projectil inflicts generally.")]
|
||||
public float Damage = 1f;
|
||||
[Tooltip("The magnitude of the blast when hitting something.")]
|
||||
public float BlastMagnitude = 0.1f;
|
||||
|
||||
public Texture[] BeamFrames; // Animation frame sequence
|
||||
public float FrameStep; // Animation time
|
||||
[HideInInspector]
|
||||
public int OwnerId = 0;
|
||||
|
||||
public float beamScale; // Default beam scale to be kept over distance
|
||||
public float MaxBeamLength; // Maximum beam length
|
||||
public WeaponEffect fxType; // Weapon type
|
||||
public bool OneShot; // Constant or single beam?
|
||||
|
||||
public bool AnimateUV; // UV Animation
|
||||
public float UVTime; // UV Animation speed
|
||||
public Texture[] BeamFrames; // Animation frame sequence
|
||||
public float FrameStep; // Animation time
|
||||
|
||||
public Transform rayImpact; // Impact transform
|
||||
public Transform rayMuzzle; // Muzzle flash transform
|
||||
public float beamScale; // Default beam scale to be kept over distance
|
||||
public float MaxBeamLength; // Maximum beam length
|
||||
|
||||
LineRenderer lineRenderer; // Line rendered component
|
||||
RaycastHit hitPoint; // Raycast structure
|
||||
RaycastHit2D hitPoint2D; // Raycasthit in 2d
|
||||
public bool AnimateUV; // UV Animation
|
||||
public float UVTime; // UV Animation speed
|
||||
|
||||
int frameNo; // Frame counter
|
||||
int FrameTimerID; // Frame timer reference
|
||||
float beamLength; // Current beam length
|
||||
float initialBeamOffset; // Initial UV offset
|
||||
public float fxOffset; // Fx offset from bullet's touch point
|
||||
public Transform rayImpact; // Impact transform
|
||||
public Transform rayMuzzle; // Muzzle flash transform
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Get line renderer component
|
||||
lineRenderer = GetComponent<LineRenderer>();
|
||||
LineRenderer lineRenderer; // Line rendered component
|
||||
RaycastHit hitPoint; // Raycast structure
|
||||
RaycastHit2D hitPoint2D; // Raycasthit in 2d
|
||||
|
||||
// Assign first frame texture
|
||||
if (!AnimateUV && BeamFrames.Length > 0)
|
||||
lineRenderer.material.mainTexture = BeamFrames[0];
|
||||
int frameNo; // Frame counter
|
||||
int FrameTimerID; // Frame timer reference
|
||||
float beamLength; // Current beam length
|
||||
float initialBeamOffset; // Initial UV offset
|
||||
public float fxOffset; // Fx offset from bullet's touch point
|
||||
|
||||
// Randomize uv offset
|
||||
initialBeamOffset = Random.Range(0f, 5f);
|
||||
}
|
||||
void Awake()
|
||||
{
|
||||
// Get line renderer component
|
||||
lineRenderer = GetComponent<LineRenderer>();
|
||||
|
||||
// OnSpawned called by pool manager
|
||||
void OnSpawned()
|
||||
{
|
||||
// Do one time raycast in case of one shot flag
|
||||
if (OneShot)
|
||||
Raycast();
|
||||
// Assign first frame texture
|
||||
if (!AnimateUV && BeamFrames.Length > 0)
|
||||
lineRenderer.material.mainTexture = BeamFrames[0];
|
||||
|
||||
// Start animation sequence if beam frames array has more than 2 elements
|
||||
if (BeamFrames.Length > 1)
|
||||
Animate();
|
||||
}
|
||||
// Randomize uv offset
|
||||
initialBeamOffset = Random.Range(0f, 5f);
|
||||
}
|
||||
|
||||
// OnDespawned called by pool manager
|
||||
void OnDespawned()
|
||||
{
|
||||
// Reset frame counter
|
||||
frameNo = 0;
|
||||
// OnSpawned called by pool manager
|
||||
void OnSpawned()
|
||||
{
|
||||
// Do one time raycast in case of one shot flag
|
||||
if (OneShot)
|
||||
Raycast();
|
||||
|
||||
// Clear timer
|
||||
if (FrameTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(FrameTimerID);
|
||||
FrameTimerID = -1;
|
||||
// Start animation sequence if beam frames array has more than 2 elements
|
||||
if (BeamFrames.Length > 1)
|
||||
Animate();
|
||||
}
|
||||
|
||||
// OnDespawned called by pool manager
|
||||
void OnDespawned()
|
||||
{
|
||||
// Reset frame counter
|
||||
frameNo = 0;
|
||||
|
||||
// Clear timer
|
||||
if (FrameTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(FrameTimerID);
|
||||
FrameTimerID = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,142 +89,124 @@ namespace FORGE3D
|
||||
// Calculate default beam proportion multiplier based on default scale and maximum length
|
||||
float propMult = MaxBeamLength * (beamScale / 10f);
|
||||
|
||||
// Raycast
|
||||
if (Physics.Raycast(ray, out hitPoint, MaxBeamLength, layerMask))
|
||||
{
|
||||
// Get current beam length and update line renderer accordingly
|
||||
beamLength = Vector3.Distance(transform.position, hitPoint.point);
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
// Raycast
|
||||
if (Physics.Raycast(ray, out hitPoint, MaxBeamLength, layerMask)
|
||||
&& DetectorCollision(hitPoint) != OwnerId)
|
||||
{
|
||||
// Get current beam length and update line renderer accordingly
|
||||
beamLength = Vector3.Distance(transform.position, hitPoint.point);
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
|
||||
// Calculate default beam proportion multiplier based on default scale and current length
|
||||
propMult = beamLength * (beamScale / 10f);
|
||||
// Spawn prefabs and apply force
|
||||
switch (fxType)
|
||||
{
|
||||
case F3DFXType.Sniper:
|
||||
F3DFXController.instance.SniperImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(4f);
|
||||
break;
|
||||
// Calculate default beam proportion multiplier based on default scale and current length
|
||||
propMult = beamLength * (beamScale / 10f);
|
||||
// Spawn prefabs and apply force
|
||||
switch (fxType)
|
||||
{
|
||||
case WeaponEffect.Sniper:
|
||||
F3DFXController.instance.SniperImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
break;
|
||||
|
||||
case F3DFXType.RailGun:
|
||||
F3DFXController.instance.RailgunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(7f);
|
||||
break;
|
||||
case WeaponEffect.RailGun:
|
||||
F3DFXController.instance.RailgunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaBeam:
|
||||
ApplyForce(0.5f);
|
||||
break;
|
||||
case WeaponEffect.PlasmaBeam:
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaBeamHeavy:
|
||||
ApplyForce(2f);
|
||||
break;
|
||||
}
|
||||
case WeaponEffect.PlasmaBeamHeavy:
|
||||
break;
|
||||
}
|
||||
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = hitPoint.point - transform.forward * 0.5f;
|
||||
}
|
||||
//checking in 2d mode
|
||||
else
|
||||
{
|
||||
RaycastHit2D ray2D = Physics2D.Raycast(new Vector2(transform.position.x, transform.position.y),
|
||||
new Vector2(transform.forward.x, transform.forward.y), beamLength, layerMask);
|
||||
if (ray2D)
|
||||
{
|
||||
// Get current beam length and update line renderer accordingly
|
||||
beamLength = Vector3.Distance(transform.position, ray2D.point);
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = hitPoint.point - transform.forward * 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set beam to maximum length
|
||||
beamLength = MaxBeamLength;
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
|
||||
// Calculate default beam proportion multiplier based on default scale and current length
|
||||
propMult = beamLength * (beamScale / 10f);
|
||||
// Spawn prefabs and apply force
|
||||
switch (fxType)
|
||||
{
|
||||
case F3DFXType.Sniper:
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = transform.position + transform.forward * beamLength;
|
||||
}
|
||||
|
||||
F3DFXController.instance.SniperImpact(ray2D.point + ray2D.normal * fxOffset);
|
||||
ApplyForce(4f);
|
||||
break;
|
||||
// Adjust muzzle position
|
||||
if (rayMuzzle)
|
||||
rayMuzzle.position = transform.position + transform.forward * 0.1f;
|
||||
|
||||
case F3DFXType.RailGun:
|
||||
F3DFXController.instance.RailgunImpact(ray2D.point + ray2D.normal * fxOffset);
|
||||
ApplyForce(7f);
|
||||
break;
|
||||
// Set beam scaling according to its length
|
||||
lineRenderer.material.SetTextureScale("_BaseMap", new Vector2(propMult, 1f));
|
||||
}
|
||||
|
||||
case F3DFXType.PlasmaBeam:
|
||||
ApplyForce(0.5f);
|
||||
break;
|
||||
/// <summary>
|
||||
/// Checks if a HitDetector was hit and registers a hit
|
||||
/// on it if so.
|
||||
/// </summary>
|
||||
/// <param name="hitPoint"></param>
|
||||
/// <returns>OwnerId of the hit detector (-1 on none)</returns>
|
||||
int DetectorCollision(RaycastHit hitPoint)
|
||||
{
|
||||
if (hitPoint.collider.gameObject.TryGetComponent(out HitDetection detector))
|
||||
{
|
||||
// Check if the one firing was hit
|
||||
if (detector.OwnerId == OwnerId)
|
||||
{
|
||||
return OwnerId;
|
||||
}
|
||||
|
||||
case F3DFXType.PlasmaBeamHeavy:
|
||||
ApplyForce(2f);
|
||||
break;
|
||||
}
|
||||
ProjectileDamage inflictling = new()
|
||||
{
|
||||
DamageValue = Damage,
|
||||
ImpactMagnitude = BlastMagnitude,
|
||||
ImpactPoint = hitPoint.point,
|
||||
ImpactDirection = transform.forward
|
||||
};
|
||||
detector.RegisterHit(inflictling);
|
||||
return detector.OwnerId;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = new Vector3(ray2D.point.x,
|
||||
ray2D.point.y,
|
||||
this.gameObject.transform.position.z) - transform.forward * 0.5f;
|
||||
}
|
||||
// Nothing was his
|
||||
else
|
||||
{
|
||||
// Set beam to maximum length
|
||||
beamLength = MaxBeamLength;
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
// Advance texture frame
|
||||
void OnFrameStep()
|
||||
{
|
||||
// Set current texture frame based on frame counter
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
frameNo++;
|
||||
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = transform.position + transform.forward * beamLength;
|
||||
}
|
||||
}
|
||||
// Reset frame counter
|
||||
if (frameNo == BeamFrames.Length)
|
||||
frameNo = 0;
|
||||
}
|
||||
|
||||
// Adjust muzzle position
|
||||
if (rayMuzzle)
|
||||
rayMuzzle.position = transform.position + transform.forward * 0.1f;
|
||||
// Initialize frame animation
|
||||
void Animate()
|
||||
{
|
||||
if (BeamFrames.Length > 1)
|
||||
{
|
||||
// Set current frame
|
||||
frameNo = 0;
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
|
||||
// Set beam scaling according to its length
|
||||
lineRenderer.material.SetTextureScale("_BaseMap", new Vector2(propMult, 1f));
|
||||
}
|
||||
// Add timer
|
||||
FrameTimerID = F3DTime.time.AddTimer(FrameStep, BeamFrames.Length - 1, OnFrameStep);
|
||||
|
||||
// Advance texture frame
|
||||
void OnFrameStep()
|
||||
{
|
||||
// Set current texture frame based on frame counter
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
frameNo++;
|
||||
frameNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset frame counter
|
||||
if (frameNo == BeamFrames.Length)
|
||||
frameNo = 0;
|
||||
}
|
||||
// Apply force to last hit object
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
if (hitPoint.rigidbody != null)
|
||||
hitPoint.rigidbody.AddForceAtPosition(transform.forward * force, hitPoint.point,
|
||||
ForceMode.VelocityChange);
|
||||
}
|
||||
|
||||
// Initialize frame animation
|
||||
void Animate()
|
||||
{
|
||||
if (BeamFrames.Length > 1)
|
||||
{
|
||||
// Set current frame
|
||||
frameNo = 0;
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
|
||||
// Add timer
|
||||
FrameTimerID = F3DTime.time.AddTimer(FrameStep, BeamFrames.Length - 1, OnFrameStep);
|
||||
|
||||
frameNo = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply force to last hit object
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
if (hitPoint.rigidbody != null)
|
||||
hitPoint.rigidbody.AddForceAtPosition(transform.forward * force, hitPoint.point,
|
||||
ForceMode.VelocityChange);
|
||||
}
|
||||
|
||||
// Set offset of impact
|
||||
public void SetOffset(float offset)
|
||||
// Set offset of impact
|
||||
public void SetOffset(float offset)
|
||||
{
|
||||
fxOffset = offset;
|
||||
}
|
||||
|
||||
@ -1,75 +1,78 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FORGE3D
|
||||
{
|
||||
// Weapon types
|
||||
public enum F3DFXType
|
||||
{
|
||||
Vulcan,
|
||||
SoloGun,
|
||||
Sniper,
|
||||
ShotGun,
|
||||
Seeker,
|
||||
RailGun,
|
||||
PlasmaGun,
|
||||
PlasmaBeam,
|
||||
PlasmaBeamHeavy,
|
||||
LightningGun,
|
||||
FlameRed,
|
||||
LaserImpulse
|
||||
}
|
||||
// Weapon types
|
||||
public enum WeaponEffect
|
||||
{
|
||||
Vulcan,
|
||||
SoloGun,
|
||||
Sniper,
|
||||
ShotGun,
|
||||
Seeker,
|
||||
RailGun,
|
||||
PlasmaGun,
|
||||
PlasmaBeam,
|
||||
PlasmaBeamHeavy,
|
||||
LightningGun,
|
||||
FlameRed,
|
||||
LaserImpulse,
|
||||
None
|
||||
}
|
||||
|
||||
public class F3DFXController : MonoBehaviour
|
||||
{
|
||||
// Singleton instance
|
||||
public static F3DFXController instance;
|
||||
public class F3DFXController : MonoBehaviour
|
||||
{
|
||||
// Singleton instance
|
||||
public static F3DFXController instance;
|
||||
|
||||
|
||||
// Current firing socket
|
||||
private int curSocket = 0;
|
||||
// Current firing socket
|
||||
private int curSocket = 0;
|
||||
|
||||
// Timer reference
|
||||
private int timerID = -1;
|
||||
// Timer reference
|
||||
private int timerID = -1;
|
||||
|
||||
[Header("Turret setup")] public Transform[] TurretSocket; // Sockets reference
|
||||
public ParticleSystem[] ShellParticles; // Bullet shells particle system
|
||||
|
||||
public F3DFXType DefaultFXType; // Default starting weapon type
|
||||
[Header("Turret setup")] public Transform[] TurretSocket; // Sockets reference
|
||||
public ParticleSystem[] ShellParticles; // Bullet shells particle system
|
||||
|
||||
[Header("Vulcan")] public Transform vulcanProjectile; // Projectile prefab
|
||||
public Transform vulcanMuzzle; // Muzzle flash prefab
|
||||
public Transform vulcanImpact; // Impact prefab
|
||||
public float vulcanOffset;
|
||||
public WeaponEffect SelectedWeaponEffect; // Default starting weapon type
|
||||
|
||||
public float VulcanFireRate = 0.07f;
|
||||
[Header("Vulcan")] public Transform vulcanProjectile; // Projectile prefab
|
||||
public Transform vulcanMuzzle; // Muzzle flash prefab
|
||||
public Transform vulcanImpact; // Impact prefab
|
||||
public float vulcanOffset;
|
||||
public float VulcanFireRate = 0.07f;
|
||||
|
||||
[Header("Solo gun")] public Transform soloGunProjectile;
|
||||
public Transform soloGunMuzzle;
|
||||
public Transform soloGunImpact;
|
||||
public float soloGunOffset;
|
||||
[Header("Solo gun")] public Transform soloGunProjectile;
|
||||
public Transform soloGunMuzzle;
|
||||
public Transform soloGunImpact;
|
||||
public float soloGunOffset;
|
||||
public float SoloGunFireRate = 0.3f;
|
||||
|
||||
[Header("Sniper")] public Transform sniperBeam;
|
||||
public Transform sniperMuzzle;
|
||||
public Transform sniperImpact;
|
||||
public float sniperOffset;
|
||||
[Header("Sniper")] public Transform sniperBeam;
|
||||
public Transform sniperMuzzle;
|
||||
public Transform sniperImpact;
|
||||
public float sniperOffset;
|
||||
|
||||
[Header("Shotgun")] public Transform shotGunProjectile;
|
||||
public Transform shotGunMuzzle;
|
||||
public Transform shotGunImpact;
|
||||
public float shotGunOffset;
|
||||
[Header("Shotgun")] public Transform shotGunProjectile;
|
||||
public Transform shotGunMuzzle;
|
||||
public Transform shotGunImpact;
|
||||
public float shotGunOffset;
|
||||
|
||||
[Header("Seeker")] public Transform seekerProjectile;
|
||||
public Transform seekerMuzzle;
|
||||
public Transform seekerImpact;
|
||||
public float seekerOffset;
|
||||
public float SeekerFireRate = 0.5f;
|
||||
|
||||
[Header("Rail gun")] public Transform railgunBeam;
|
||||
public Transform railgunMuzzle;
|
||||
public Transform railgunImpact;
|
||||
public float railgunOffset;
|
||||
public float RailGunFireRate = 1f;
|
||||
|
||||
[Header("Plasma gun")] public Transform plasmagunProjectile;
|
||||
public Transform plasmagunMuzzle;
|
||||
@ -81,264 +84,275 @@ namespace FORGE3D
|
||||
|
||||
[Header("Plasma beam heavy")] public Transform plasmaBeamHeavy;
|
||||
public float plasmaBeamHeavyOffset;
|
||||
private AudioSource plasmaBeamLoopAudio;
|
||||
|
||||
[Header("Lightning gun")] public Transform lightningGunBeam;
|
||||
public float lightingGunBeamOffset;
|
||||
[Header("Lightning gun")] public Transform lightningGunBeam;
|
||||
public float lightingGunBeamOffset;
|
||||
|
||||
[Header("Flame")] public Transform flameRed;
|
||||
public float flameOffset;
|
||||
[Header("Flame")] public Transform flameRed;
|
||||
public float flameOffset;
|
||||
|
||||
[Header("Laser impulse")] public Transform laserImpulseProjectile;
|
||||
public Transform laserImpulseMuzzle;
|
||||
public Transform laserImpulseImpact;
|
||||
[Header("Laser impulse")] public Transform laserImpulseProjectile;
|
||||
public Transform laserImpulseMuzzle;
|
||||
public Transform laserImpulseImpact;
|
||||
public float laserImpulseOffset;
|
||||
public float LaserImpulseFireRate = 0.08f;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Initialize singleton
|
||||
instance = this;
|
||||
//Owner of this weapon system
|
||||
private int _ownerId = 0;
|
||||
|
||||
// Initialize bullet shells particles
|
||||
for (int i = 0; i < ShellParticles.Length; i++)
|
||||
{
|
||||
var em = ShellParticles[i].emission;
|
||||
em.enabled = false;
|
||||
ShellParticles[i].Stop();
|
||||
ShellParticles[i].gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
_ownerId = gameObject.GetInstanceID();
|
||||
// Initialize singleton
|
||||
instance = this;
|
||||
|
||||
// Initialize bullet shells particles
|
||||
for (int i = 0; i < ShellParticles.Length; i++)
|
||||
{
|
||||
var em = ShellParticles[i].emission;
|
||||
em.enabled = false;
|
||||
ShellParticles[i].Stop();
|
||||
ShellParticles[i].gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Switch to next weapon type
|
||||
public void NextWeapon()
|
||||
{
|
||||
if ((int) DefaultFXType < Enum.GetNames(typeof(F3DFXType)).Length - 1)
|
||||
{
|
||||
DefaultFXType++;
|
||||
}
|
||||
}
|
||||
// Switch to next weapon type
|
||||
public void NextWeapon()
|
||||
{
|
||||
if ((int)SelectedWeaponEffect < Enum.GetNames(typeof(WeaponEffect)).Length - 1)
|
||||
{
|
||||
SelectedWeaponEffect++;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch to previous weapon type
|
||||
public void PrevWeapon()
|
||||
{
|
||||
if (DefaultFXType > 0)
|
||||
{
|
||||
DefaultFXType--;
|
||||
}
|
||||
}
|
||||
// Switch to previous weapon type
|
||||
public void PrevWeapon()
|
||||
{
|
||||
if (SelectedWeaponEffect > 0)
|
||||
{
|
||||
SelectedWeaponEffect--;
|
||||
}
|
||||
}
|
||||
|
||||
// Advance to next turret socket
|
||||
private void AdvanceSocket()
|
||||
{
|
||||
curSocket++;
|
||||
if (curSocket >= TurretSocket.Length)
|
||||
curSocket = 0;
|
||||
}
|
||||
// Advance to next turret socket
|
||||
private void AdvanceSocket()
|
||||
{
|
||||
curSocket++;
|
||||
if (curSocket >= TurretSocket.Length)
|
||||
curSocket = 0;
|
||||
}
|
||||
|
||||
// Fire turret weapon
|
||||
public void Fire()
|
||||
{
|
||||
switch (DefaultFXType)
|
||||
{
|
||||
case F3DFXType.Vulcan:
|
||||
// Fire vulcan at specified rate until canceled
|
||||
timerID = F3DTime.time.AddTimer(VulcanFireRate, Vulcan);
|
||||
// Invoke manually before the timer ticked to avoid initial delay
|
||||
Vulcan();
|
||||
break;
|
||||
// Fire turret weapon
|
||||
public void Fire()
|
||||
{
|
||||
switch (SelectedWeaponEffect)
|
||||
{
|
||||
case WeaponEffect.Vulcan:
|
||||
// Fire vulcan at specified rate until canceled
|
||||
timerID = F3DTime.time.AddTimer(VulcanFireRate, Vulcan);
|
||||
// Invoke manually before the timer ticked to avoid initial delay
|
||||
Vulcan();
|
||||
break;
|
||||
|
||||
case F3DFXType.SoloGun:
|
||||
timerID = F3DTime.time.AddTimer(0.2f, SoloGun);
|
||||
SoloGun();
|
||||
break;
|
||||
case WeaponEffect.SoloGun:
|
||||
timerID = F3DTime.time.AddTimer(SoloGunFireRate, SoloGun);
|
||||
SoloGun();
|
||||
break;
|
||||
|
||||
case F3DFXType.Sniper:
|
||||
timerID = F3DTime.time.AddTimer(0.3f, Sniper);
|
||||
Sniper();
|
||||
break;
|
||||
case WeaponEffect.Sniper:
|
||||
timerID = F3DTime.time.AddTimer(0.3f, Sniper);
|
||||
Sniper();
|
||||
break;
|
||||
|
||||
case F3DFXType.ShotGun:
|
||||
timerID = F3DTime.time.AddTimer(0.3f, ShotGun);
|
||||
ShotGun();
|
||||
break;
|
||||
case WeaponEffect.ShotGun:
|
||||
timerID = F3DTime.time.AddTimer(0.3f, ShotGun);
|
||||
ShotGun();
|
||||
break;
|
||||
|
||||
case F3DFXType.Seeker:
|
||||
timerID = F3DTime.time.AddTimer(0.2f, Seeker);
|
||||
Seeker();
|
||||
break;
|
||||
case WeaponEffect.Seeker:
|
||||
timerID = F3DTime.time.AddTimer(SeekerFireRate, Seeker);
|
||||
Seeker();
|
||||
break;
|
||||
|
||||
case F3DFXType.RailGun:
|
||||
timerID = F3DTime.time.AddTimer(0.2f, RailGun);
|
||||
RailGun();
|
||||
break;
|
||||
case WeaponEffect.RailGun:
|
||||
timerID = F3DTime.time.AddTimer(RailGunFireRate, RailGun);
|
||||
RailGun();
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaGun:
|
||||
timerID = F3DTime.time.AddTimer(0.2f, PlasmaGun);
|
||||
PlasmaGun();
|
||||
break;
|
||||
case WeaponEffect.PlasmaGun:
|
||||
timerID = F3DTime.time.AddTimer(0.2f, PlasmaGun);
|
||||
PlasmaGun();
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaBeam:
|
||||
// Beams has no timer requirement
|
||||
PlasmaBeam();
|
||||
break;
|
||||
case WeaponEffect.PlasmaBeam:
|
||||
// Beams has no timer requirement
|
||||
PlasmaBeam();
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaBeamHeavy:
|
||||
// Beams has no timer requirement
|
||||
PlasmaBeamHeavy();
|
||||
break;
|
||||
case WeaponEffect.PlasmaBeamHeavy:
|
||||
// Beams has no timer requirement
|
||||
PlasmaBeamHeavy();
|
||||
break;
|
||||
|
||||
case F3DFXType.LightningGun:
|
||||
// Beams has no timer requirement
|
||||
LightningGun();
|
||||
break;
|
||||
case WeaponEffect.LightningGun:
|
||||
// Beams has no timer requirement
|
||||
LightningGun();
|
||||
break;
|
||||
|
||||
case F3DFXType.FlameRed:
|
||||
// Flames has no timer requirement
|
||||
FlameRed();
|
||||
break;
|
||||
case WeaponEffect.FlameRed:
|
||||
// Flames has no timer requirement
|
||||
FlameRed();
|
||||
break;
|
||||
|
||||
case F3DFXType.LaserImpulse:
|
||||
timerID = F3DTime.time.AddTimer(0.15f, LaserImpulse);
|
||||
LaserImpulse();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case WeaponEffect.LaserImpulse:
|
||||
timerID = F3DTime.time.AddTimer(LaserImpulseFireRate, LaserImpulse);
|
||||
LaserImpulse();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Stop firing
|
||||
public void Stop()
|
||||
{
|
||||
// Remove firing timer
|
||||
if (timerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(timerID);
|
||||
timerID = -1;
|
||||
}
|
||||
// Stop firing
|
||||
public void Stop()
|
||||
{
|
||||
// Remove firing timer
|
||||
if (timerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimerNextTick(timerID);
|
||||
timerID = -1;
|
||||
}
|
||||
|
||||
switch (DefaultFXType)
|
||||
{
|
||||
case F3DFXType.PlasmaBeam:
|
||||
F3DAudioController.instance.PlasmaBeamClose(transform.position);
|
||||
break;
|
||||
switch (SelectedWeaponEffect)
|
||||
{
|
||||
case WeaponEffect.PlasmaBeam:
|
||||
F3DAudioController.instance.PlasmaBeamClose(transform.position);
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaBeamHeavy:
|
||||
F3DAudioController.instance.PlasmaBeamHeavyClose(transform.position);
|
||||
break;
|
||||
case WeaponEffect.PlasmaBeamHeavy:
|
||||
StopPlasmaBeamHeavy();
|
||||
F3DAudioController.instance.PlasmaBeamHeavyClose(transform.position);
|
||||
if (plasmaBeamLoopAudio == null) break;
|
||||
F3DPoolManager.Pools["GeneratedPool"].Despawn(plasmaBeamLoopAudio.gameObject.transform);
|
||||
break;
|
||||
|
||||
case F3DFXType.LightningGun:
|
||||
F3DAudioController.instance.LightningGunClose(transform.position);
|
||||
break;
|
||||
case WeaponEffect.LightningGun:
|
||||
F3DAudioController.instance.LightningGunClose(transform.position);
|
||||
break;
|
||||
|
||||
case F3DFXType.FlameRed:
|
||||
F3DAudioController.instance.FlameGunClose(transform.position);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case WeaponEffect.FlameRed:
|
||||
F3DAudioController.instance.FlameGunClose(transform.position);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Fire vulcan weapon
|
||||
private void Vulcan()
|
||||
{
|
||||
// Get random rotation that offset spawned projectile
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
// Spawn muzzle flash and projectile with the rotation offset at current socket position
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanProjectile,
|
||||
TurretSocket[curSocket].position + TurretSocket[curSocket].forward,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
// Fire vulcan weapon
|
||||
private void Vulcan()
|
||||
{
|
||||
// Get random rotation that offset spawned projectile
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
// Spawn muzzle flash and projectile with the rotation offset at current socket position
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanProjectile,
|
||||
TurretSocket[curSocket].position + TurretSocket[curSocket].forward,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
|
||||
var proj = newGO.gameObject.GetComponent<F3DProjectile>();
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(vulcanOffset);
|
||||
}
|
||||
var proj = newGO.gameObject.GetComponent<F3DProjectile>();
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(vulcanOffset);
|
||||
proj.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
// Emit one bullet shell
|
||||
if (ShellParticles.Length > 0)
|
||||
ShellParticles[curSocket].Emit(1);
|
||||
// Emit one bullet shell
|
||||
if (ShellParticles.Length > 0)
|
||||
ShellParticles[curSocket].Emit(1);
|
||||
|
||||
// Play shot sound effect
|
||||
F3DAudioController.instance.VulcanShot(TurretSocket[curSocket].position);
|
||||
// Play shot sound effect
|
||||
F3DAudioController.instance.VulcanShot(TurretSocket[curSocket].position);
|
||||
|
||||
// Advance to next turret socket
|
||||
AdvanceSocket();
|
||||
}
|
||||
// Advance to next turret socket
|
||||
AdvanceSocket();
|
||||
}
|
||||
|
||||
// Spawn vulcan weapon impact
|
||||
public void VulcanImpact(Vector3 pos)
|
||||
{
|
||||
// Spawn impact prefab at specified position
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanImpact, pos, Quaternion.identity, null);
|
||||
// Play impact sound effect
|
||||
F3DAudioController.instance.VulcanHit(pos);
|
||||
}
|
||||
// Spawn vulcan weapon impact
|
||||
public void VulcanImpact(Vector3 pos)
|
||||
{
|
||||
// Spawn impact prefab at specified position
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(vulcanImpact, pos, Quaternion.identity, null);
|
||||
// Play impact sound effect
|
||||
F3DAudioController.instance.VulcanHit(pos);
|
||||
}
|
||||
|
||||
// Fire sologun weapon
|
||||
private void SoloGun()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunProjectile,
|
||||
TurretSocket[curSocket].position + TurretSocket[curSocket].forward,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
var proj = newGO.GetComponent<F3DProjectile>();
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(soloGunOffset);
|
||||
}
|
||||
// Fire sologun weapon
|
||||
private void SoloGun()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunProjectile,
|
||||
TurretSocket[curSocket].position + TurretSocket[curSocket].forward,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
var proj = newGO.GetComponent<F3DProjectile>();
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(soloGunOffset);
|
||||
proj.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
F3DAudioController.instance.SoloGunShot(TurretSocket[curSocket].position);
|
||||
AdvanceSocket();
|
||||
}
|
||||
F3DAudioController.instance.SoloGunShot(TurretSocket[curSocket].position);
|
||||
AdvanceSocket();
|
||||
}
|
||||
|
||||
// Spawn sologun weapon impact
|
||||
public void SoloGunImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.SoloGunHit(pos);
|
||||
}
|
||||
// Spawn sologun weapon impact
|
||||
public void SoloGunImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(soloGunImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.SoloGunHit(pos);
|
||||
}
|
||||
|
||||
// Fire sniper weapon
|
||||
private void Sniper()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
// Fire sniper weapon
|
||||
private void Sniper()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperBeam, TurretSocket[curSocket].position,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
var beam = newGO.GetComponent<F3DBeam>();
|
||||
if (beam)
|
||||
{
|
||||
beam.SetOffset(sniperOffset);
|
||||
}
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
var newGO =
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperBeam, TurretSocket[curSocket].position,
|
||||
offset * TurretSocket[curSocket].rotation, null).gameObject;
|
||||
var beam = newGO.GetComponent<F3DBeam>();
|
||||
if (beam)
|
||||
{
|
||||
beam.SetOffset(sniperOffset);
|
||||
}
|
||||
|
||||
F3DAudioController.instance.SniperShot(TurretSocket[curSocket].position);
|
||||
if (ShellParticles.Length > 0)
|
||||
ShellParticles[curSocket].Emit(1);
|
||||
AdvanceSocket();
|
||||
}
|
||||
F3DAudioController.instance.SniperShot(TurretSocket[curSocket].position);
|
||||
if (ShellParticles.Length > 0)
|
||||
ShellParticles[curSocket].Emit(1);
|
||||
AdvanceSocket();
|
||||
}
|
||||
|
||||
// Spawn sniper weapon impact
|
||||
public void SniperImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.SniperHit(pos);
|
||||
}
|
||||
// Spawn sniper weapon impact
|
||||
public void SniperImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(sniperImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.SniperHit(pos);
|
||||
}
|
||||
|
||||
// Fire shotgun weapon
|
||||
private void ShotGun()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(shotGunMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(shotGunProjectile, TurretSocket[curSocket].position,
|
||||
offset * TurretSocket[curSocket].rotation, null);
|
||||
F3DAudioController.instance.ShotGunShot(TurretSocket[curSocket].position);
|
||||
if (ShellParticles.Length > 0)
|
||||
// Fire shotgun weapon
|
||||
private void ShotGun()
|
||||
{
|
||||
var offset = Quaternion.Euler(UnityEngine.Random.onUnitSphere);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(shotGunMuzzle, TurretSocket[curSocket].position,
|
||||
TurretSocket[curSocket].rotation, TurretSocket[curSocket]);
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(shotGunProjectile, TurretSocket[curSocket].position,
|
||||
offset * TurretSocket[curSocket].rotation, null);
|
||||
F3DAudioController.instance.ShotGunShot(TurretSocket[curSocket].position);
|
||||
if (ShellParticles.Length > 0)
|
||||
ShellParticles[curSocket].Emit(1);
|
||||
AdvanceSocket();
|
||||
}
|
||||
@ -362,6 +376,7 @@ namespace FORGE3D
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(seekerOffset);
|
||||
proj.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
F3DAudioController.instance.SeekerShot(TurretSocket[curSocket].position);
|
||||
@ -390,7 +405,8 @@ namespace FORGE3D
|
||||
if (beam)
|
||||
{
|
||||
beam.SetOffset(railgunOffset);
|
||||
}
|
||||
beam.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
F3DAudioController.instance.RailGunShot(TurretSocket[curSocket].position);
|
||||
if (ShellParticles.Length > 0)
|
||||
@ -418,64 +434,76 @@ namespace FORGE3D
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(plasmaOffset);
|
||||
}
|
||||
proj.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
F3DAudioController.instance.PlasmaGunShot(TurretSocket[curSocket].position);
|
||||
AdvanceSocket();
|
||||
}
|
||||
F3DAudioController.instance.PlasmaGunShot(TurretSocket[curSocket].position);
|
||||
AdvanceSocket();
|
||||
}
|
||||
|
||||
// Spawn plasma gun weapon impact
|
||||
public void PlasmaGunImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmagunImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.PlasmaGunHit(pos);
|
||||
}
|
||||
// Spawn plasma gun weapon impact
|
||||
public void PlasmaGunImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmagunImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.PlasmaGunHit(pos);
|
||||
}
|
||||
|
||||
// Fire plasma beam weapon
|
||||
private void PlasmaBeam()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmaBeam, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
// Fire plasma beam weapon
|
||||
private void PlasmaBeam()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmaBeam, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
|
||||
F3DAudioController.instance.PlasmaBeamLoop(transform.position, transform.parent);
|
||||
}
|
||||
F3DAudioController.instance.PlasmaBeamLoop(transform.position, transform.parent);
|
||||
}
|
||||
|
||||
// Fire heavy beam weapon
|
||||
private void PlasmaBeamHeavy()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmaBeamHeavy, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
private void StopPlasmaBeamHeavy()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
foreach (Transform child in TurretSocket[i])
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Despawn(child, plasmaBeamHeavy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
F3DAudioController.instance.PlasmaBeamHeavyLoop(transform.position, transform.parent);
|
||||
}
|
||||
// Fire heavy beam weapon
|
||||
private void PlasmaBeamHeavy()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(plasmaBeamHeavy, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
|
||||
// Fire lightning gun weapon
|
||||
private void LightningGun()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(lightningGunBeam, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
plasmaBeamLoopAudio = F3DAudioController.instance.PlasmaBeamHeavyLoop(transform.position, transform.parent);
|
||||
}
|
||||
|
||||
F3DAudioController.instance.LightningGunLoop(transform.position, transform);
|
||||
}
|
||||
// Fire lightning gun weapon
|
||||
private void LightningGun()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(lightningGunBeam, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
|
||||
// Fire flames weapon
|
||||
private void FlameRed()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(flameRed, TurretSocket[i].position,
|
||||
F3DAudioController.instance.LightningGunLoop(transform.position, transform);
|
||||
}
|
||||
|
||||
// Fire flames weapon
|
||||
private void FlameRed()
|
||||
{
|
||||
for (var i = 0; i < TurretSocket.Length; i++)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(flameRed, TurretSocket[i].position,
|
||||
TurretSocket[i].rotation,
|
||||
TurretSocket[i]);
|
||||
}
|
||||
@ -496,18 +524,19 @@ namespace FORGE3D
|
||||
if (proj)
|
||||
{
|
||||
proj.SetOffset(laserImpulseOffset);
|
||||
}
|
||||
proj.OwnerId = _ownerId;
|
||||
}
|
||||
|
||||
F3DAudioController.instance.LaserImpulseShot(TurretSocket[curSocket].position);
|
||||
F3DAudioController.instance.LaserImpulseShot(TurretSocket[curSocket].position);
|
||||
|
||||
AdvanceSocket();
|
||||
}
|
||||
AdvanceSocket();
|
||||
}
|
||||
|
||||
// Spawn laser pulse weapon impact
|
||||
public void LaserImpulseImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(laserImpulseImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.LaserImpulseHit(pos);
|
||||
}
|
||||
}
|
||||
// Spawn laser pulse weapon impact
|
||||
public void LaserImpulseImpact(Vector3 pos)
|
||||
{
|
||||
F3DPoolManager.Pools["GeneratedPool"].Spawn(laserImpulseImpact, pos, Quaternion.identity, null);
|
||||
F3DAudioController.instance.LaserImpulseHit(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,223 +3,258 @@ using System.Collections;
|
||||
|
||||
namespace FORGE3D
|
||||
{
|
||||
[RequireComponent(typeof (LineRenderer))]
|
||||
public class F3DLightning : MonoBehaviour
|
||||
{
|
||||
public LayerMask layerMask;
|
||||
[RequireComponent(typeof(LineRenderer))]
|
||||
public class F3DLightning : MonoBehaviour
|
||||
{
|
||||
public LayerMask layerMask;
|
||||
|
||||
public Texture[] BeamFrames; // Animation frame sequence
|
||||
public float FrameStep; // Animation time
|
||||
public bool RandomizeFrames; // Randomization of animation frames
|
||||
public Texture[] BeamFrames; // Animation frame sequence
|
||||
public float FrameStep; // Animation time
|
||||
public bool RandomizeFrames; // Randomization of animation frames
|
||||
|
||||
public int Points; // How many points should be used to construct the beam
|
||||
public int Points; // How many points should be used to construct the beam
|
||||
|
||||
public float MaxBeamLength; // Maximum beam length
|
||||
public float beamScale; // Default beam scale to be kept over distance
|
||||
public float MaxBeamLength; // Maximum beam length
|
||||
public float beamScale; // Default beam scale to be kept over distance
|
||||
|
||||
public bool AnimateUV; // UV Animation
|
||||
public float UVTime; // UV Animation speed
|
||||
public bool AnimateUV; // UV Animation
|
||||
public float UVTime; // UV Animation speed
|
||||
|
||||
public bool Oscillate; // Beam oscillation flag
|
||||
public float Amplitude; // Beam amplitude
|
||||
public float OscillateTime; // Beam oscillation rate
|
||||
public bool Oscillate; // Beam oscillation flag
|
||||
public float Amplitude; // Beam amplitude
|
||||
public float OscillateTime; // Beam oscillation rate
|
||||
|
||||
public Transform rayImpact; // Impact transform
|
||||
public Transform rayMuzzle; // Muzzle flash transform
|
||||
public Transform rayImpact; // Impact transform
|
||||
public Transform rayMuzzle; // Muzzle flash transform
|
||||
|
||||
LineRenderer lineRenderer; // Line rendered component
|
||||
RaycastHit hitPoint; // Raycast structure
|
||||
[Tooltip("The amount of damage this projectil inflicts generally.")]
|
||||
public float damage = 10f;
|
||||
[Tooltip("The magnitude of the blast when hitting something.")]
|
||||
public float blastMagnitude = 1f;
|
||||
|
||||
int frameNo; // Frame counter
|
||||
int FrameTimerID; // Frame timer reference
|
||||
int OscillateTimerID; // Beam oscillation timer reference
|
||||
[HideInInspector]
|
||||
public int OwnerId = 0;
|
||||
|
||||
float beamLength; // Current beam length
|
||||
float initialBeamOffset; // Initial UV offset
|
||||
LineRenderer lineRenderer; // Line rendered component
|
||||
RaycastHit hitPoint; // Raycast structure
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Get line renderer component
|
||||
lineRenderer = GetComponent<LineRenderer>();
|
||||
int frameNo; // Frame counter
|
||||
int FrameTimerID; // Frame timer reference
|
||||
int OscillateTimerID; // Beam oscillation timer reference
|
||||
|
||||
// Assign first frame texture
|
||||
if (!AnimateUV && BeamFrames.Length > 0)
|
||||
lineRenderer.material.mainTexture = BeamFrames[0];
|
||||
float beamLength; // Current beam length
|
||||
float initialBeamOffset; // Initial UV offset
|
||||
|
||||
// Randomize uv offset
|
||||
initialBeamOffset = Random.Range(0f, 5f);
|
||||
}
|
||||
void Awake()
|
||||
{
|
||||
// Get line renderer component
|
||||
lineRenderer = GetComponent<LineRenderer>();
|
||||
|
||||
// OnSpawned called by pool manager
|
||||
void OnSpawned()
|
||||
{
|
||||
// Start animation sequence if beam frames array has more than 2 elements
|
||||
if (BeamFrames.Length > 1)
|
||||
Animate();
|
||||
// Assign first frame texture
|
||||
if (!AnimateUV && BeamFrames.Length > 0)
|
||||
lineRenderer.material.mainTexture = BeamFrames[0];
|
||||
|
||||
// Start oscillation sequence
|
||||
if (Oscillate && Points > 0)
|
||||
OscillateTimerID = F3DTime.time.AddTimer(OscillateTime, OnOscillate);
|
||||
// Randomize uv offset
|
||||
initialBeamOffset = Random.Range(0f, 5f);
|
||||
}
|
||||
|
||||
}
|
||||
// OnSpawned called by pool manager
|
||||
void OnSpawned()
|
||||
{
|
||||
// Start animation sequence if beam frames array has more than 2 elements
|
||||
if (BeamFrames.Length > 1)
|
||||
Animate();
|
||||
|
||||
// OnDespawned called by pool manager
|
||||
void OnDespawned()
|
||||
{
|
||||
// Reset frame counter
|
||||
frameNo = 0;
|
||||
// Start oscillation sequence
|
||||
if (Oscillate && Points > 0)
|
||||
OscillateTimerID = F3DTime.time.AddTimer(OscillateTime, OnOscillate);
|
||||
|
||||
// Clear frame animation timer
|
||||
if (FrameTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(FrameTimerID);
|
||||
FrameTimerID = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Clear oscillation timer
|
||||
if (OscillateTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(OscillateTimerID);
|
||||
OscillateTimerID = -1;
|
||||
}
|
||||
}
|
||||
// OnDespawned called by pool manager
|
||||
void OnDespawned()
|
||||
{
|
||||
// Reset frame counter
|
||||
frameNo = 0;
|
||||
|
||||
// Hit point calculation
|
||||
void Raycast()
|
||||
{
|
||||
// Prepare structure and create ray
|
||||
hitPoint = new RaycastHit();
|
||||
Ray ray = new Ray(transform.position, transform.forward);
|
||||
// Clear frame animation timer
|
||||
if (FrameTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(FrameTimerID);
|
||||
FrameTimerID = -1;
|
||||
}
|
||||
|
||||
// Calculate default beam proportion multiplier based on default scale and maximum length
|
||||
float propMult = MaxBeamLength*(beamScale/10f);
|
||||
// Clear oscillation timer
|
||||
if (OscillateTimerID != -1)
|
||||
{
|
||||
F3DTime.time.RemoveTimer(OscillateTimerID);
|
||||
OscillateTimerID = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Raycast
|
||||
if (Physics.Raycast(ray, out hitPoint, MaxBeamLength, layerMask))
|
||||
{
|
||||
// Get current beam length
|
||||
beamLength = Vector3.Distance(transform.position, hitPoint.point);
|
||||
// Hit point calculation
|
||||
void Raycast()
|
||||
{
|
||||
// Prepare structure and create ray
|
||||
hitPoint = new RaycastHit();
|
||||
Ray ray = new Ray(transform.position, transform.forward);
|
||||
|
||||
// Update line renderer
|
||||
if (!Oscillate)
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
// Calculate default beam proportion multiplier based on default scale and maximum length
|
||||
float propMult = MaxBeamLength * (beamScale / 10f);
|
||||
|
||||
// Calculate default beam proportion multiplier based on default scale and current length
|
||||
propMult = beamLength*(beamScale/10f);
|
||||
// Raycast
|
||||
if (Physics.Raycast(ray, out hitPoint, MaxBeamLength, layerMask)
|
||||
&& DetectorCollision(hitPoint) != OwnerId)
|
||||
{
|
||||
// Get current beam length
|
||||
beamLength = Vector3.Distance(transform.position, hitPoint.point);
|
||||
|
||||
// Apply hit force to rigidbody
|
||||
ApplyForce(0.1f);
|
||||
// Update line renderer
|
||||
if (!Oscillate)
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = hitPoint.point - transform.forward*0.5f;
|
||||
}
|
||||
// Calculate default beam proportion multiplier based on default scale and current length
|
||||
propMult = beamLength * (beamScale / 10f);
|
||||
|
||||
// Nothing was his
|
||||
else
|
||||
{
|
||||
// Set beam to maximum length
|
||||
beamLength = MaxBeamLength;
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = hitPoint.point - transform.forward * 0.5f;
|
||||
}
|
||||
|
||||
// Update beam length
|
||||
if (!Oscillate)
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
// Nothing was his
|
||||
else
|
||||
{
|
||||
// Set beam to maximum length
|
||||
beamLength = MaxBeamLength;
|
||||
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = transform.position + transform.forward*beamLength;
|
||||
}
|
||||
// Update beam length
|
||||
if (!Oscillate)
|
||||
lineRenderer.SetPosition(1, new Vector3(0f, 0f, beamLength));
|
||||
|
||||
// Adjust muzzle position
|
||||
if (rayMuzzle)
|
||||
rayMuzzle.position = transform.position + transform.forward*0.1f;
|
||||
// Adjust impact effect position
|
||||
if (rayImpact)
|
||||
rayImpact.position = transform.position + transform.forward * beamLength;
|
||||
}
|
||||
|
||||
// Set beam scaling according to its length
|
||||
lineRenderer.material.SetTextureScale("_BaseMap", new Vector2(propMult, 1f));
|
||||
}
|
||||
// Adjust muzzle position
|
||||
if (rayMuzzle)
|
||||
rayMuzzle.position = transform.position + transform.forward * 0.1f;
|
||||
|
||||
// Generate random noise numbers based on amplitude
|
||||
float GetRandomNoise()
|
||||
{
|
||||
return Random.Range(-Amplitude, Amplitude);
|
||||
}
|
||||
// Set beam scaling according to its length
|
||||
lineRenderer.material.SetTextureScale("_BaseMap", new Vector2(propMult, 1f));
|
||||
}
|
||||
|
||||
// Advance texture frame
|
||||
void OnFrameStep()
|
||||
{
|
||||
// Randomize frame counter
|
||||
if (RandomizeFrames)
|
||||
frameNo = Random.Range(0, BeamFrames.Length);
|
||||
/// <summary>
|
||||
/// Checks if a HitDetector was hit and registers a hit
|
||||
/// on it if so.
|
||||
/// </summary>
|
||||
/// <param name="hitPoint"></param>
|
||||
/// <returns>OwnerId of the hit detector (-1 on none)</returns>
|
||||
int DetectorCollision(RaycastHit hitPoint)
|
||||
{
|
||||
if (hitPoint.collider.gameObject.TryGetComponent(out HitDetection detector))
|
||||
{
|
||||
// Check if the one firing was hit
|
||||
if (detector.OwnerId == OwnerId)
|
||||
{
|
||||
return OwnerId;
|
||||
}
|
||||
|
||||
// Set current texture frame based on frame counter
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
frameNo++;
|
||||
ProjectileDamage inflictling = new()
|
||||
{
|
||||
DamageValue = damage,
|
||||
ImpactMagnitude = blastMagnitude,
|
||||
ImpactPoint = hitPoint.point,
|
||||
ImpactDirection = transform.forward
|
||||
};
|
||||
detector.RegisterHit(inflictling);
|
||||
return detector.OwnerId;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Reset frame counter
|
||||
if (frameNo == BeamFrames.Length)
|
||||
frameNo = 0;
|
||||
}
|
||||
// Generate random noise numbers based on amplitude
|
||||
float GetRandomNoise()
|
||||
{
|
||||
return Random.Range(-Amplitude, Amplitude);
|
||||
}
|
||||
|
||||
// Oscillate beam
|
||||
void OnOscillate()
|
||||
{
|
||||
// Calculate number of points based on beam length and default number of points
|
||||
int points = (int) ((beamLength/10f)*Points);
|
||||
// Advance texture frame
|
||||
void OnFrameStep()
|
||||
{
|
||||
// Randomize frame counter
|
||||
if (RandomizeFrames)
|
||||
frameNo = Random.Range(0, BeamFrames.Length);
|
||||
|
||||
// Update line rendered segments in case number of points less than 2
|
||||
if (points < 2)
|
||||
{
|
||||
// lineRenderer.SetVertexCount(2);
|
||||
lineRenderer.positionCount = 2;
|
||||
lineRenderer.SetPosition(0, Vector3.zero);
|
||||
lineRenderer.SetPosition(1, new Vector3(0, 0, beamLength));
|
||||
}
|
||||
// Update line renderer segments
|
||||
else
|
||||
{
|
||||
// Update number of points for line renderer
|
||||
lineRenderer.positionCount = points;
|
||||
// Set zero point manually
|
||||
lineRenderer.SetPosition(0, Vector3.zero);
|
||||
// Set current texture frame based on frame counter
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
frameNo++;
|
||||
|
||||
// Update each point with random noise based on amplitude
|
||||
for (int i = 1; i < points - 1; i++)
|
||||
lineRenderer.SetPosition(i,
|
||||
new Vector3(GetRandomNoise(), GetRandomNoise(), (beamLength/(points - 1))*i));
|
||||
// Reset frame counter
|
||||
if (frameNo == BeamFrames.Length)
|
||||
frameNo = 0;
|
||||
}
|
||||
|
||||
// Set last point manually
|
||||
lineRenderer.SetPosition(points - 1, new Vector3(0f, 0f, beamLength));
|
||||
}
|
||||
}
|
||||
// Oscillate beam
|
||||
void OnOscillate()
|
||||
{
|
||||
// Calculate number of points based on beam length and default number of points
|
||||
int points = (int)((beamLength / 10f) * Points);
|
||||
|
||||
// Initialize frame animation
|
||||
void Animate()
|
||||
{
|
||||
// Set current frame
|
||||
frameNo = 0;
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
// Update line rendered segments in case number of points less than 2
|
||||
if (points < 2)
|
||||
{
|
||||
// lineRenderer.SetVertexCount(2);
|
||||
lineRenderer.positionCount = 2;
|
||||
lineRenderer.SetPosition(0, Vector3.zero);
|
||||
lineRenderer.SetPosition(1, new Vector3(0, 0, beamLength));
|
||||
}
|
||||
// Update line renderer segments
|
||||
else
|
||||
{
|
||||
// Update number of points for line renderer
|
||||
lineRenderer.positionCount = points;
|
||||
// Set zero point manually
|
||||
lineRenderer.SetPosition(0, Vector3.zero);
|
||||
|
||||
// Add timer
|
||||
FrameTimerID = F3DTime.time.AddTimer(FrameStep, OnFrameStep);
|
||||
// Update each point with random noise based on amplitude
|
||||
for (int i = 1; i < points - 1; i++)
|
||||
lineRenderer.SetPosition(i,
|
||||
new Vector3(GetRandomNoise(), GetRandomNoise(), (beamLength / (points - 1)) * i));
|
||||
|
||||
frameNo = 1;
|
||||
}
|
||||
// Set last point manually
|
||||
lineRenderer.SetPosition(points - 1, new Vector3(0f, 0f, beamLength));
|
||||
}
|
||||
}
|
||||
|
||||
// Apply force to last hit object
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
if (hitPoint.rigidbody != null)
|
||||
hitPoint.rigidbody.AddForceAtPosition(transform.forward*force, hitPoint.point, ForceMode.VelocityChange);
|
||||
}
|
||||
// Initialize frame animation
|
||||
void Animate()
|
||||
{
|
||||
// Set current frame
|
||||
frameNo = 0;
|
||||
lineRenderer.material.mainTexture = BeamFrames[frameNo];
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Animate texture UV
|
||||
if (AnimateUV)
|
||||
lineRenderer.material.SetVector("_Offset", new Vector2(Time.time*UVTime + initialBeamOffset, 0f));
|
||||
// Add timer
|
||||
FrameTimerID = F3DTime.time.AddTimer(FrameStep, OnFrameStep);
|
||||
|
||||
// Process raycasting
|
||||
Raycast();
|
||||
}
|
||||
}
|
||||
frameNo = 1;
|
||||
}
|
||||
|
||||
// Apply force to last hit object
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
if (hitPoint.rigidbody != null)
|
||||
hitPoint.rigidbody.AddForceAtPosition(transform.forward * force, hitPoint.point, ForceMode.VelocityChange);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Animate texture UV
|
||||
if (AnimateUV)
|
||||
lineRenderer.material.SetVector("_Offset", new Vector2(Time.time * UVTime + initialBeamOffset, 0f));
|
||||
|
||||
// Process raycasting
|
||||
Raycast();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,14 +5,23 @@ namespace FORGE3D
|
||||
{
|
||||
public class F3DProjectile : MonoBehaviour
|
||||
{
|
||||
public F3DFXType fxType; // Weapon type
|
||||
public LayerMask layerMask;
|
||||
public float lifeTime = 5f; // Projectile life time
|
||||
public float despawnDelay; // Delay despawn in ms
|
||||
public float velocity = 300f; // Projectile velocity
|
||||
public float RaycastAdvance = 2f; // Raycast advance multiplier
|
||||
public bool DelayDespawn = false; // Projectile despawn flag
|
||||
public ParticleSystem[] delayedParticles; // Array of delayed particles
|
||||
public WeaponEffect fxType; // Weapon type
|
||||
public LayerMask layerMask;
|
||||
|
||||
[Tooltip("The amount of damage this projectil inflicts generally.")]
|
||||
public float Damage = 10f;
|
||||
|
||||
[Tooltip("The magnitude of the blast when hitting something.")]
|
||||
public float BlastMagnitude = 1f;
|
||||
|
||||
[HideInInspector]
|
||||
public int OwnerId = 0;
|
||||
public float LifeTime = 5f; // Projectile life time
|
||||
public float despawnDelay; // Delay despawn in ms
|
||||
public float velocity = 300f; // Projectile velocity
|
||||
public float RaycastAdvance = 2f; // Raycast advance multiplier
|
||||
public bool DelayDespawn = false; // Projectile despawn flag
|
||||
public ParticleSystem[] delayedParticles; // Array of delayed particles
|
||||
ParticleSystem[] particles; // Array of projectile particles
|
||||
new Transform transform; // Cached transform
|
||||
RaycastHit hitPoint; // Raycast structure
|
||||
@ -26,16 +35,17 @@ namespace FORGE3D
|
||||
// Cache transform and get all particle systems attached
|
||||
transform = GetComponent<Transform>();
|
||||
particles = GetComponentsInChildren<ParticleSystem>();
|
||||
}
|
||||
|
||||
// OnSpawned called by pool manager
|
||||
public void OnSpawned()
|
||||
{
|
||||
// Reset flags and raycast structure
|
||||
isHit = false;
|
||||
isFXSpawned = false;
|
||||
timer = 0f;
|
||||
hitPoint = new RaycastHit();
|
||||
}
|
||||
|
||||
// OnSpawned called by pool manager
|
||||
public void OnSpawned()
|
||||
{
|
||||
// Reset flags and raycast structure
|
||||
isHit = false;
|
||||
isFXSpawned = false;
|
||||
timer = 0f;
|
||||
hitPoint = new RaycastHit();
|
||||
|
||||
}
|
||||
|
||||
@ -73,77 +83,81 @@ namespace FORGE3D
|
||||
F3DPoolManager.Pools["GeneratedPool"].Despawn(transform);
|
||||
}
|
||||
|
||||
// Apply hit force on impact
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
if (hitPoint.rigidbody != null)
|
||||
hitPoint.rigidbody.AddForceAtPosition(transform.forward * force, hitPoint.point,
|
||||
ForceMode.VelocityChange);
|
||||
}
|
||||
// TODO: for my purposes this is not enough control over this effect
|
||||
// I will have to implement HitDetectors for everything which can be hit
|
||||
void ApplyForce(float force)
|
||||
{
|
||||
// if (hitPoint.rigidbody != null)
|
||||
// hitPoint.rigidbody.AddForceAtPosition(transform.forward * force, hitPoint.point,
|
||||
// ForceMode.VelocityChange);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// If something was hit
|
||||
if (isHit)
|
||||
{
|
||||
// Execute once
|
||||
if (!isFXSpawned)
|
||||
{
|
||||
// Invoke corresponding method that spawns FX
|
||||
switch (fxType)
|
||||
{
|
||||
case F3DFXType.Vulcan:
|
||||
F3DFXController.instance.VulcanImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(2.5f);
|
||||
break;
|
||||
|
||||
case F3DFXType.SoloGun:
|
||||
F3DFXController.instance.SoloGunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
|
||||
case F3DFXType.Seeker:
|
||||
F3DFXController.instance.SeekerImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(30f);
|
||||
break;
|
||||
|
||||
case F3DFXType.PlasmaGun:
|
||||
F3DFXController.instance.PlasmaGunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
|
||||
case F3DFXType.LaserImpulse:
|
||||
F3DFXController.instance.LaserImpulseImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
}
|
||||
|
||||
isFXSpawned = true;
|
||||
}
|
||||
|
||||
// Despawn current projectile
|
||||
if (!DelayDespawn || (DelayDespawn && (timer >= despawnDelay)))
|
||||
OnProjectileDestroy();
|
||||
}
|
||||
|
||||
// No collision occurred yet
|
||||
else
|
||||
{
|
||||
// Projectile step per frame based on velocity and time
|
||||
Vector3 step = transform.forward * Time.deltaTime * velocity;
|
||||
|
||||
// Raycast for targets with ray length based on frame step by ray cast advance multiplier
|
||||
if (Physics.Raycast(transform.position, transform.forward, out hitPoint,
|
||||
step.magnitude * RaycastAdvance,
|
||||
layerMask))
|
||||
{
|
||||
isHit = true;
|
||||
|
||||
if (hitPoint.collider.gameObject.TryGetComponent(out HitFeedbackTestObjectBehavior obj))
|
||||
void Update()
|
||||
{
|
||||
// If something was hit
|
||||
if (isHit)
|
||||
{
|
||||
// Execute once
|
||||
if (!isFXSpawned)
|
||||
{
|
||||
// Invoke corresponding method that spawns FX
|
||||
switch (fxType)
|
||||
{
|
||||
obj.Hit();
|
||||
case WeaponEffect.Vulcan:
|
||||
F3DFXController.instance.VulcanImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(2.5f);
|
||||
break;
|
||||
|
||||
case WeaponEffect.SoloGun:
|
||||
F3DFXController.instance.SoloGunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
|
||||
case WeaponEffect.Seeker:
|
||||
F3DFXController.instance.SeekerImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(30f);
|
||||
break;
|
||||
|
||||
case WeaponEffect.PlasmaGun:
|
||||
F3DFXController.instance.PlasmaGunImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
|
||||
case WeaponEffect.LaserImpulse:
|
||||
F3DFXController.instance.LaserImpulseImpact(hitPoint.point + hitPoint.normal * fxOffset);
|
||||
ApplyForce(25f);
|
||||
break;
|
||||
}
|
||||
|
||||
isFXSpawned = true;
|
||||
}
|
||||
|
||||
// Despawn current projectile
|
||||
if (!DelayDespawn || (DelayDespawn && (timer >= despawnDelay)))
|
||||
OnProjectileDestroy();
|
||||
}
|
||||
|
||||
// No collision occurred yet
|
||||
else
|
||||
{
|
||||
// Projectile step per frame based on velocity and time
|
||||
Vector3 step = transform.forward * Time.deltaTime * velocity;
|
||||
|
||||
// Raycast for targets with ray length based on frame step by ray cast advance multiplier
|
||||
if (Physics.Raycast(transform.position, transform.forward, out hitPoint,
|
||||
step.magnitude * RaycastAdvance,
|
||||
layerMask))
|
||||
{
|
||||
|
||||
if (DetectorCollision(hitPoint) == OwnerId)
|
||||
{
|
||||
transform.position += 2 * step;
|
||||
timer += Time.deltaTime;
|
||||
return;
|
||||
}
|
||||
|
||||
isHit = true;
|
||||
|
||||
// Invoke delay routine if required
|
||||
if (DelayDespawn)
|
||||
{
|
||||
@ -155,23 +169,52 @@ namespace FORGE3D
|
||||
// Nothing hit
|
||||
else
|
||||
{
|
||||
// Projectile despawn after run out of time
|
||||
if (timer >= lifeTime)
|
||||
OnProjectileDestroy();
|
||||
}
|
||||
// Projectile despawn after run out of time
|
||||
if (timer >= LifeTime)
|
||||
OnProjectileDestroy();
|
||||
}
|
||||
|
||||
// Advances projectile forward
|
||||
transform.position += step;
|
||||
// Advances projectile forward
|
||||
transform.position += step;
|
||||
}
|
||||
|
||||
// Updates projectile timer
|
||||
timer += Time.deltaTime;
|
||||
}
|
||||
|
||||
//Set offset
|
||||
public void SetOffset(float offset)
|
||||
{
|
||||
fxOffset = offset;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Checks if a HitDetector was hit and registers a hit
|
||||
/// on it if so.
|
||||
/// </summary>
|
||||
/// <param name="hitPoint"></param>
|
||||
/// <returns>OwnerId of the hit detector (-1 on none)</returns>
|
||||
int DetectorCollision(RaycastHit hitPoint)
|
||||
{
|
||||
if (hitPoint.collider.gameObject.TryGetComponent(out HitDetection detector))
|
||||
{
|
||||
// Check if the one firing was hit
|
||||
if (detector.OwnerId == OwnerId)
|
||||
{
|
||||
return OwnerId;
|
||||
}
|
||||
|
||||
ProjectileDamage inflictling = new()
|
||||
{
|
||||
DamageValue = Damage,
|
||||
ImpactMagnitude = BlastMagnitude,
|
||||
ImpactPoint = hitPoint.point,
|
||||
ImpactDirection = transform.forward
|
||||
};
|
||||
detector.RegisterHit(inflictling);
|
||||
return detector.OwnerId;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Set offset
|
||||
public void SetOffset(float offset)
|
||||
{
|
||||
fxOffset = offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FORGE3D
|
||||
{
|
||||
@ -23,20 +24,21 @@ namespace FORGE3D
|
||||
{
|
||||
public int id;
|
||||
public bool isActive;
|
||||
public bool removeNextTick = false;
|
||||
|
||||
public float rate;
|
||||
public int ticks;
|
||||
public int ticksElapsed;
|
||||
public float last;
|
||||
public Action callBack;
|
||||
public float rate;
|
||||
public int ticks;
|
||||
public int ticksElapsed;
|
||||
public float last;
|
||||
public Action callBack;
|
||||
|
||||
public Timer(int id_, float rate_, int ticks_, Action callback_)
|
||||
{
|
||||
id = id_;
|
||||
rate = rate_ < 0 ? 0 : rate_;
|
||||
ticks = ticks_ < 0 ? 0 : ticks_;
|
||||
callBack = callback_;
|
||||
last = 0;
|
||||
public Timer(int id_, float rate_, int ticks_, Action callback_)
|
||||
{
|
||||
id = id_;
|
||||
rate = rate_ < 0 ? 0 : rate_;
|
||||
ticks = ticks_ < 0 ? 0 : ticks_;
|
||||
callBack = callback_;
|
||||
last = 0;
|
||||
ticksElapsed = 0;
|
||||
isActive = true;
|
||||
}
|
||||
@ -47,25 +49,32 @@ namespace FORGE3D
|
||||
|
||||
if (isActive && last >= rate)
|
||||
{
|
||||
last = 0;
|
||||
ticksElapsed++;
|
||||
callBack.Invoke();
|
||||
if (removeNextTick)
|
||||
{
|
||||
isActive = false;
|
||||
F3DTime.time.RemoveTimer(id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ticks > 0 && ticks == ticksElapsed)
|
||||
{
|
||||
isActive = false;
|
||||
F3DTime.time.RemoveTimer(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
last = 0;
|
||||
ticksElapsed++;
|
||||
callBack.Invoke();
|
||||
|
||||
/// <summary>
|
||||
/// Awake
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
time = this;
|
||||
if (ticks > 0 && ticks == ticksElapsed)
|
||||
{
|
||||
isActive = false;
|
||||
F3DTime.time.RemoveTimer(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Awake
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
time = this;
|
||||
timers = new List<Timer>();
|
||||
removalPending = new List<int>();
|
||||
}
|
||||
@ -104,18 +113,23 @@ namespace FORGE3D
|
||||
removalPending.Add(timerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timer removal queue handler
|
||||
/// </summary>
|
||||
void Remove()
|
||||
{
|
||||
if (removalPending.Count > 0)
|
||||
{
|
||||
foreach (int id in removalPending)
|
||||
for (int i = 0; i < timers.Count; i++)
|
||||
if (timers[i].id == id)
|
||||
{
|
||||
timers.RemoveAt(i);
|
||||
public void RemoveTimerNextTick(int timerId)
|
||||
{
|
||||
timers.First(t => t.id == timerId).removeNextTick = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timer removal queue handler
|
||||
/// </summary>
|
||||
void Remove()
|
||||
{
|
||||
if (removalPending.Count > 0)
|
||||
{
|
||||
foreach (int id in removalPending)
|
||||
for (int i = 0; i < timers.Count; i++)
|
||||
if (timers[i].id == id)
|
||||
{
|
||||
timers.RemoveAt(i);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -31,8 +31,8 @@ namespace FORGE3D
|
||||
|
||||
void SetWeaponTypeText()
|
||||
{
|
||||
WeaponTypeText.text = _fxTypeName[(int) _fxControllers[0].DefaultFXType];
|
||||
}
|
||||
WeaponTypeText.text = _fxTypeName[(int)_fxControllers[0].SelectedWeaponEffect];
|
||||
}
|
||||
|
||||
public void OnButtonNext()
|
||||
{
|
||||
|
||||
@ -21,8 +21,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Burnout_Heat_001
|
||||
m_Shader: {fileID: -6465566751694194690, guid: a69f632f7605c4347b0ac15ec7b2d967,
|
||||
type: 3}
|
||||
m_Shader: {fileID: -6465566751694194690, guid: a69f632f7605c4347b0ac15ec7b2d967, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@ -75,7 +74,7 @@ Material:
|
||||
- _AlphaCutoff: 0.5
|
||||
- _BumpAmt: 0
|
||||
- _Dist: 1
|
||||
- _Distort: 0.01
|
||||
- _Distort: 0
|
||||
- _InvFade: 3
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
|
||||
@ -21,8 +21,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Burnout_Sparks
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 894e255bca895714c929238ea0e6273f,
|
||||
type: 3}
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 894e255bca895714c929238ea0e6273f, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@ -76,6 +75,7 @@ Material:
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 2
|
||||
- _BlendOp: 0
|
||||
- _Blur: -1
|
||||
- _Boost: 65.64
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
@ -109,6 +109,7 @@ Material:
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Offset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -120,7 +120,7 @@ Material:
|
||||
- _AlphaCutoff: 0.5
|
||||
- _BurnOut: 0
|
||||
- _BurnUVOffset: 0.15
|
||||
- _Burnout: 0.3
|
||||
- _Burnout: 0
|
||||
- _ClipThreshold: 0.12
|
||||
- _Cut: -0.47
|
||||
- _Cutoff: 0.33
|
||||
|
||||
@ -21,8 +21,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: seeker_bolt_flare
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 894e255bca895714c929238ea0e6273f,
|
||||
type: 3}
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 89754397a45ebd242a4116119466e163, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@ -76,6 +75,7 @@ Material:
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 2
|
||||
- _BlendOp: 0
|
||||
- _Blur: -1
|
||||
- _Boost: 1.29
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
@ -109,6 +109,7 @@ Material:
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Offset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -21,8 +21,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: seeker_bolt_fragment
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 894e255bca895714c929238ea0e6273f,
|
||||
type: 3}
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 89754397a45ebd242a4116119466e163, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@ -76,6 +75,7 @@ Material:
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 2
|
||||
- _BlendOp: 0
|
||||
- _Blur: -1
|
||||
- _Boost: 1
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
@ -109,6 +109,7 @@ Material:
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Offset: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TintColor: {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -8,8 +8,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: seeker_bolt_muzzle
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 894e255bca895714c929238ea0e6273f,
|
||||
type: 3}
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 89754397a45ebd242a4116119466e163, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
@ -63,6 +62,7 @@ Material:
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 2
|
||||
- _BlendOp: 0
|
||||
- _Blur: -1
|
||||
- _Boost: 1
|
||||
- _CameraFadingEnabled: 0
|
||||
- _CameraFarFadeDistance: 2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49ca46ce7082ccf4c91329cd9b7c4b61
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 762a17aff08aa1f40ac72b27c15fe2d1
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
@ -1,319 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &100000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400000}
|
||||
- component: {fileID: 3300000}
|
||||
- component: {fileID: 2300000}
|
||||
m_Layer: 0
|
||||
m_Name: Quad
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &400000
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.7987106}
|
||||
m_LocalScale: {x: 2.2, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0}
|
||||
--- !u!33 &3300000
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &2300000
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 931f12332f881b342980bc9900f15441, 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
|
||||
--- !u!1 &100002
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400002}
|
||||
- component: {fileID: 3300002}
|
||||
- component: {fileID: 2300002}
|
||||
m_Layer: 0
|
||||
m_Name: Quad
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &400002
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_LocalRotation: {x: 0.5, y: -0.5, z: 0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.7987106}
|
||||
m_LocalScale: {x: 2.2, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 90}
|
||||
--- !u!33 &3300002
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &2300002
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 931f12332f881b342980bc9900f15441, 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
|
||||
--- !u!1 &100004
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400004}
|
||||
- component: {fileID: 11400000}
|
||||
- component: {fileID: 11400002}
|
||||
m_Layer: 0
|
||||
m_Name: seeker_bolt_muzzle_example
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &400004
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
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_Children:
|
||||
- {fileID: 400002}
|
||||
- {fileID: 400000}
|
||||
- {fileID: 400006}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: af19da7458dc9174699d0b34f404eafc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
DespawnDelay: 0.05
|
||||
DespawnOnMouseUp: 0
|
||||
--- !u!114 &11400002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100004}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a5df3c5f0444ba74991107c0d882530e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RandomScale: 1
|
||||
RandomRotation: 1
|
||||
MinScale: 0.8
|
||||
MaxScale: 1.1
|
||||
MinRotation: -360
|
||||
MaxRotaion: 360
|
||||
--- !u!1 &100006
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400006}
|
||||
- component: {fileID: 10800000}
|
||||
m_Layer: 0
|
||||
m_Name: Point light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &400006
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.6052952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 400004}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!108 &10800000
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100006}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 2
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.82941175, b: 0.5735294, a: 1}
|
||||
m_Intensity: 1.2311152
|
||||
m_Range: 250
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 1
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 0.536
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43a8e47b31adb9a47b81c4653b412e5c
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
Loading…
Reference in New Issue
Block a user