From 572dd1017ba575a82c4d90bd430ed2ef3ca1cef6 Mon Sep 17 00:00:00 2001 From: January Desk Date: Mon, 15 May 2023 04:11:57 +0800 Subject: [PATCH] Add Maneuver Lines --- Assets/Materials/ManeuverLine.mat | 31 ++ Assets/Materials/ManeuverLine.mat.meta | 8 + Assets/Materials/ManeuverLineAllied.mat | 31 ++ Assets/Materials/ManeuverLineAllied.mat.meta | 8 + Assets/Materials/ManeuverLineFrench.mat | 31 ++ Assets/Materials/ManeuverLineFrench.mat.meta | 8 + Assets/Prefabs/ManeuverLine.prefab | 133 +++++ Assets/Prefabs/ManeuverLine.prefab.meta | 7 + Assets/Prefabs/ManeuverLineAllied.prefab | 67 +++ Assets/Prefabs/ManeuverLineAllied.prefab.meta | 7 + Assets/Prefabs/ManeuverLineFrench.prefab | 71 +++ Assets/Prefabs/ManeuverLineFrench.prefab.meta | 7 + Assets/Scenes/ManeuverTest.unity | 511 ++++++++++++++++++ Assets/Scenes/ManeuverTest.unity.meta | 7 + Assets/Scenes/SampleScene.unity | 86 ++- Assets/Scripts/GameManager.cs | 130 ++++- Assets/Scripts/GameUnit.cs | 10 +- Assets/Scripts/LoadTextButton.cs | 5 +- Assets/Scripts/PlotManager.cs | 3 +- Assets/Shaders/ManeuverLine.shader | 71 +++ Assets/Shaders/ManeuverLine.shader.meta | 10 + ProjectSettings/ProjectSettings.asset | 8 +- readme.md | 2 +- 23 files changed, 1194 insertions(+), 58 deletions(-) create mode 100644 Assets/Materials/ManeuverLine.mat create mode 100644 Assets/Materials/ManeuverLine.mat.meta create mode 100644 Assets/Materials/ManeuverLineAllied.mat create mode 100644 Assets/Materials/ManeuverLineAllied.mat.meta create mode 100644 Assets/Materials/ManeuverLineFrench.mat create mode 100644 Assets/Materials/ManeuverLineFrench.mat.meta create mode 100644 Assets/Prefabs/ManeuverLine.prefab create mode 100644 Assets/Prefabs/ManeuverLine.prefab.meta create mode 100644 Assets/Prefabs/ManeuverLineAllied.prefab create mode 100644 Assets/Prefabs/ManeuverLineAllied.prefab.meta create mode 100644 Assets/Prefabs/ManeuverLineFrench.prefab create mode 100644 Assets/Prefabs/ManeuverLineFrench.prefab.meta create mode 100644 Assets/Scenes/ManeuverTest.unity create mode 100644 Assets/Scenes/ManeuverTest.unity.meta create mode 100644 Assets/Shaders/ManeuverLine.shader create mode 100644 Assets/Shaders/ManeuverLine.shader.meta diff --git a/Assets/Materials/ManeuverLine.mat b/Assets/Materials/ManeuverLine.mat new file mode 100644 index 0000000..028c282 --- /dev/null +++ b/Assets/Materials/ManeuverLine.mat @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ManeuverLine + m_Shader: {fileID: 4800000, guid: 8a2bbe4bd2924bb4792203c78b6985c1, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: [] + m_Colors: + - _Color: {r: 0.6229975, g: 0.6252051, b: 0.754717, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/ManeuverLine.mat.meta b/Assets/Materials/ManeuverLine.mat.meta new file mode 100644 index 0000000..a337762 --- /dev/null +++ b/Assets/Materials/ManeuverLine.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fbf6b59657a28d4b96c344aeaf695d4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/ManeuverLineAllied.mat b/Assets/Materials/ManeuverLineAllied.mat new file mode 100644 index 0000000..40487ee --- /dev/null +++ b/Assets/Materials/ManeuverLineAllied.mat @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ManeuverLineAllied + m_Shader: {fileID: 4800000, guid: 8a2bbe4bd2924bb4792203c78b6985c1, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: [] + m_Colors: + - _Color: {r: 0.8666667, g: 0.007843138, b: 0.05882353, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/ManeuverLineAllied.mat.meta b/Assets/Materials/ManeuverLineAllied.mat.meta new file mode 100644 index 0000000..1896b5b --- /dev/null +++ b/Assets/Materials/ManeuverLineAllied.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 732d38c9a054d5e48ac4d0fd5749ecad +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/ManeuverLineFrench.mat b/Assets/Materials/ManeuverLineFrench.mat new file mode 100644 index 0000000..b393ec9 --- /dev/null +++ b/Assets/Materials/ManeuverLineFrench.mat @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ManeuverLineFrench + m_Shader: {fileID: 4800000, guid: 8a2bbe4bd2924bb4792203c78b6985c1, type: 3} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: [] + m_Colors: + - _Color: {r: 0.07058824, g: 0.08235294, b: 0.77254903, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/ManeuverLineFrench.mat.meta b/Assets/Materials/ManeuverLineFrench.mat.meta new file mode 100644 index 0000000..4151f98 --- /dev/null +++ b/Assets/Materials/ManeuverLineFrench.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 80beea560ceb8644db73c9357628c3d3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/ManeuverLine.prefab b/Assets/Prefabs/ManeuverLine.prefab new file mode 100644 index 0000000..f188fb3 --- /dev/null +++ b/Assets/Prefabs/ManeuverLine.prefab @@ -0,0 +1,133 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6752556433943405164 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6752556433943405170} + - component: {fileID: 6752556433943405165} + m_Layer: 0 + m_Name: ManeuverLine + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6752556433943405170 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6752556433943405164} + 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 &6752556433943405165 +LineRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6752556433943405164} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 5fbf6b59657a28d4b96c344aeaf695d4, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 2, y: 0, z: 0} + - {x: 4, y: 2, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.015594482 + value: 0.17592621 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_UseWorldSpace: 1 + m_Loop: 0 diff --git a/Assets/Prefabs/ManeuverLine.prefab.meta b/Assets/Prefabs/ManeuverLine.prefab.meta new file mode 100644 index 0000000..24fa4bb --- /dev/null +++ b/Assets/Prefabs/ManeuverLine.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 31e917efe3393e64dae5005271daa3f8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/ManeuverLineAllied.prefab b/Assets/Prefabs/ManeuverLineAllied.prefab new file mode 100644 index 0000000..f347f9c --- /dev/null +++ b/Assets/Prefabs/ManeuverLineAllied.prefab @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &7325768921553007871 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6752556433943405164, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Name + value: ManeuverLineAllied + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405165, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 732d38c9a054d5e48ac4d0fd5749ecad, type: 2} + - target: {fileID: 6752556433943405165, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Positions.Array.data[0].x + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.x + value: -1.0053506 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.y + value: 1.8555471 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} diff --git a/Assets/Prefabs/ManeuverLineAllied.prefab.meta b/Assets/Prefabs/ManeuverLineAllied.prefab.meta new file mode 100644 index 0000000..633ed1c --- /dev/null +++ b/Assets/Prefabs/ManeuverLineAllied.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b625a0a26334f864bada65b8d1d52935 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/ManeuverLineFrench.prefab b/Assets/Prefabs/ManeuverLineFrench.prefab new file mode 100644 index 0000000..394ff51 --- /dev/null +++ b/Assets/Prefabs/ManeuverLineFrench.prefab @@ -0,0 +1,71 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &4229331746077966735 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6752556433943405164, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Name + value: ManeuverLineFrench + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405165, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 80beea560ceb8644db73c9357628c3d3, type: 2} + - target: {fileID: 6752556433943405165, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Positions.Array.data[0].x + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405165, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Positions.Array.data[1].x + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.x + value: 0.33131123 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.y + value: 2.8172913 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} diff --git a/Assets/Prefabs/ManeuverLineFrench.prefab.meta b/Assets/Prefabs/ManeuverLineFrench.prefab.meta new file mode 100644 index 0000000..7f2074a --- /dev/null +++ b/Assets/Prefabs/ManeuverLineFrench.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 541a7d4ab2587e643b1ff76912d6ebb8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ManeuverTest.unity b/Assets/Scenes/ManeuverTest.unity new file mode 100644 index 0000000..573ef7d --- /dev/null +++ b/Assets/Scenes/ManeuverTest.unity @@ -0,0 +1,511 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &606349800 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 606349803} + - component: {fileID: 606349802} + - component: {fileID: 606349801} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &606349801 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606349800} + m_Enabled: 1 +--- !u!20 &606349802 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606349800} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &606349803 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606349800} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + 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!1 &1440824722 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1440824724} + - component: {fileID: 1440824723} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!120 &1440824723 +LineRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440824722} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 97a3f7c4fdc0e2748945bf82058d28cd, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 2, y: 2, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.015594482 + value: 0.17592621 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_UseWorldSpace: 1 + m_Loop: 0 +--- !u!4 &1440824724 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440824722} + 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: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &5159163938624628137 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7423195097295692771, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_Name + value: ManeuverLineFrench + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalPosition.x + value: 0.33131123 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalPosition.y + value: 2.8172913 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7423195097295692797, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} +--- !u!1001 &6752556434388380258 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6752556433943405164, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_Name + value: ManeuverLine + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6752556433943405170, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 31e917efe3393e64dae5005271daa3f8, type: 3} +--- !u!1001 &7565352209625148939 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalPosition.x + value: -1.0053506 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalPosition.y + value: 1.8555471 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926029, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4044155815533926035, guid: b625a0a26334f864bada65b8d1d52935, type: 3} + propertyPath: m_Name + value: ManeuverLineAllied + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b625a0a26334f864bada65b8d1d52935, type: 3} diff --git a/Assets/Scenes/ManeuverTest.unity.meta b/Assets/Scenes/ManeuverTest.unity.meta new file mode 100644 index 0000000..f2b886c --- /dev/null +++ b/Assets/Scenes/ManeuverTest.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3e3eda2e165ada4c9731e7363c8e86b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 38bbd28..4bf1e53 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -499,7 +499,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &133350086 GameObject: @@ -773,13 +773,13 @@ MonoBehaviour: 1 1.7.3.4 1 1 6 0 0 262144 1 38 - 1 1.7.2.3 - 1 1 271 0 0 262144 2 35 + 1 1.7.2.3 1 + 1 271 0 0 262144 2 35 1 1.7.3.1 1 1 2 0 0 262144 2 36 - 1 1.7.3.2 - 1 1 161 0 0 262144 2 36 + 1 1.7.3.2 1 1 + 161 0 0 262144 2 36 ' m_CaretBlinkRate: 0.85 @@ -2248,7 +2248,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &527622979 GameObject: @@ -2964,13 +2964,13 @@ MonoBehaviour: 1 1.7.3.4 1 1 6 0 0 262144 1 38 - 1 1.7.2.3 - 1 1 271 0 0 262144 2 35 + 1 1.7.2.3 1 + 1 271 0 0 262144 2 35 1 1.7.3.1 1 1 2 0 0 262144 2 36 - 1 1.7.3.2 - 1 1 161 0 0 262144 2 36 + 1 1.7.3.2 1 1 + 161 0 0 262144 2 36 ' m_CaretBlinkRate: 0.85 @@ -3447,11 +3447,11 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "11\r\nThe Battle of Coruna, 16th January 1809 British A/I\r\n1809 1 16 - 14 0 0 0 1 15\r\n2 9 8 1\r\n2 8 9 1\r\n0 100 250 500\r\nCoruna.map\r\nCoruna.oob\r\nCoruna.pdt\r\n0 - 0 0 0 0 0 0 0\r\n100 90 30\r\n0 0 0 0 0 0 0 0\r\n2 1 2 1\r\n1 1.7.3.3 1 1 348 - 0 0 262144 1 37\r\n1 1.7.3.4 1 1 6 0 0 262144 1 38\r\n1 1.7.2.3 1 1 271 0 0 262144 - 2 35\r\n1 1.7.3.1 1 1 2 0 0 262144 2 36\r\n1 1.7.3.2 1 1 161 0 0 262144 2 36\r\n\u200B" + m_text: "11\nThe Battle of Coruna, 16th January 1809 British A/I\n1809 1 16 14 + 0 0 0 1 15\n2 9 8 1\n2 8 9 1\n0 100 250 500\nCoruna.map\nCoruna.oob\nCoruna.pdt\n0 + 0 0 0 0 0 0 0\n100 90 30\n0 0 0 0 0 0 0 0\n2 1 2 1\n1 1.7.3.3 1 1 348 0 0 262144 + 1 37\n1 1.7.3.4 1 1 6 0 0 262144 1 38\n1 1.7.2.3 1 1 271 0 0 262144 2 35\n1 1.7.3.1 + 1 1 2 0 0 262144 2 36\n1 1.7.3.2 1 1 161 0 0 262144 2 36\n\u200B" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -4509,7 +4509,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1070573733 GameObject: @@ -4796,6 +4796,37 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 28} m_Pivot: {x: 0.5, y: 1} +--- !u!1 &1227895210 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1227895211} + m_Layer: 0 + m_Name: ManeuverLineContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1227895211 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1227895210} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1229456880 GameObject: m_ObjectHideFlags: 0 @@ -5392,7 +5423,10 @@ MonoBehaviour: m_EditorClassIdentifier: FrenchUnitPrefab: {fileID: 7473275516617706600, guid: e5acd46dff273604ab1fae4a42efb2f9, type: 3} AlliedUnitPrefab: {fileID: 7799588107180821209, guid: 4bfe011efe9871546954ca9666bb225e, type: 3} + ManeuverLineFrenchPrefab: {fileID: 7423195097295692771, guid: 541a7d4ab2587e643b1ff76912d6ebb8, type: 3} + ManeuverLineAlliedPrefab: {fileID: 4044155815533926035, guid: b625a0a26334f864bada65b8d1d52935, type: 3} UnitContainer: {fileID: 1043526283} + ManeuverLineContainer: {fileID: 1227895210} DistanceThreshold: 3 TextMode: 0 ShowMode: 0 @@ -5522,11 +5556,11 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "11\r\nThe Battle of Coruna, 16th January 1809 British A/I\r\n1809 1 16 - 14 0 0 0 1 15\r\n2 9 8 1\r\n2 8 9 1\r\n0 100 250 500\r\nCoruna.map\r\nCoruna.oob\r\nCoruna.pdt\r\n0 - 0 0 0 0 0 0 0\r\n100 90 30\r\n0 0 0 0 0 0 0 0\r\n2 1 2 1\r\n1 1.7.3.3 1 1 348 - 0 0 262144 1 37\r\n1 1.7.3.4 1 1 6 0 0 262144 1 38\r\n1 1.7.2.3 1 1 271 0 0 262144 - 2 35\r\n1 1.7.3.1 1 1 2 0 0 262144 2 36\r\n1 1.7.3.2 1 1 161 0 0 262144 2 36\r\n\u200B" + m_text: "11\nThe Battle of Coruna, 16th January 1809 British A/I\n1809 1 16 14 + 0 0 0 1 15\n2 9 8 1\n2 8 9 1\n0 100 250 500\nCoruna.map\nCoruna.oob\nCoruna.pdt\n0 + 0 0 0 0 0 0 0\n100 90 30\n0 0 0 0 0 0 0 0\n2 1 2 1\n1 1.7.3.3 1 1 348 0 0 262144 + 1 37\n1 1.7.3.4 1 1 6 0 0 262144 1 38\n1 1.7.2.3 1 1 271 0 0 262144 2 35\n1 1.7.3.1 + 1 1 2 0 0 262144 2 36\n1 1.7.3.2 1 1 161 0 0 262144 2 36\n\u200B" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -5641,7 +5675,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 75} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1572081564 MonoBehaviour: @@ -6112,7 +6146,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 75} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1710852945 MonoBehaviour: @@ -6303,7 +6337,7 @@ RectTransform: - {fileID: 1349836825} - {fileID: 1239890709} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -6942,8 +6976,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 24, y: 0} - m_SizeDelta: {x: 352, y: 50} + m_AnchoredPosition: {x: 27, y: 0} + m_SizeDelta: {x: 346, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1868812397 MonoBehaviour: diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index b8e4c0c..915b0e9 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -108,6 +108,21 @@ public string ReportMenAndGuns() return $"{men} {menWord}, {guns} {gunsWord}"; } + public float[] GetCenter() + { + var X = 0f; + var Y = 0f; + var S = 0f; + foreach(var mapUnit in MapUnits) + { + X += mapUnit.X * mapUnit.Strength; + Y += mapUnit.Y * mapUnit.Strength; + S += mapUnit.Strength; + } + + return new float[] { X / S, Y / S }; + } + } public interface IUnitSelectionPublisher @@ -131,8 +146,11 @@ public class GameManager : MonoBehaviour, IUnitSelectionPublisher public GameObject FrenchUnitPrefab; public GameObject AlliedUnitPrefab; + public GameObject ManeuverLineFrenchPrefab; + public GameObject ManeuverLineAlliedPrefab; public GameObject UnitContainer; + public GameObject ManeuverLineContainer; UnitGroup unitGroup; // JTSUnitStates unitStatus; @@ -141,6 +159,7 @@ public class GameManager : MonoBehaviour, IUnitSelectionPublisher List mapGroupsOld; Dictionary viewMap = new(); Dictionary modelMap = new(); + Dictionary, LineRenderer> lineViewMap = new(); GameUnit selectingGameUnit; @@ -171,19 +190,48 @@ static float MapUnitDistance(MapUnitAdaptor a, MapUnitAdaptor b) return Mathf.Sqrt(dx * dx + dy * dy); } - /* - public void Setup(string scnName) + IEnumerable> MatchMapGroups() { - var scnText = DataLoader.LoadScenario(scnName); + var lookup = new Dictionary>(); + foreach(var _mapGroups in new List>() { mapGroups, mapGroupsOld}) + { + foreach(var mapGroup in _mapGroups) + { + var dic = new Dictionary(); + foreach (var mapUnit in mapGroup.MapUnits) + { + dic[mapUnit.UnitState.OobItem] = mapUnit.Strength; + } + lookup[mapGroup] = dic; + } + } - var scenario = new JTSScenario(); - scenario.Extract(scnText); + foreach(var mapGroup in mapGroups) + { + var unit2strength = lookup[mapGroup]; + var weightTotal = unit2strength.Values.Sum(); - var oobName = RemoveExtension(scenario.OobFile); - var oobText = DataLoader.LoadOob(oobName); + foreach (var mapGroupOld in mapGroupsOld) + { + var unit2strengthOld = lookup[mapGroupOld]; + var weight = 0; + foreach(var KV in unit2strength) + { + if(unit2strengthOld.TryGetValue(KV.Key, out var strengthOld)) + { + var strength = KV.Value; + weight += strength; + } + } + if(weight > weightTotal / 2) + { + yield return new Tuple(mapGroup, mapGroupOld); + break; + } + } + } + } - unitGroup = JTSOobParser.ParseUnits(oobText); - */ public void Setup() { var scenario = new JTSScenario(); @@ -208,23 +256,52 @@ public void Setup() if(ShowMode == 1) { - var scenarioOld = new JTSScenario(); - scenarioOld.Extract(Text.ScnOld); - if(scenarioOld.OobFile != scenario.OobFile) + if (Text.ScnOld == null || Text.ScnOld == "") { - Debug.Log("Oob File doesn't match. Potential problem?"); - //return; + Debug.Log("Old File is not loaded?"); } - var unitStatusOld = new JTSUnitStates(); - unitStatusOld.ExtractByLines(unitGroup, scenarioOld.DynamicCommandBlock); + else + { + var scenarioOld = new JTSScenario(); + scenarioOld.Extract(Text.ScnOld); + if (scenarioOld.OobFile != scenario.OobFile) + { + Debug.Log("Oob File doesn't match. Potential problem?"); + //return; + } + var unitStatusOld = new JTSUnitStates(); + unitStatusOld.ExtractByLines(unitGroup, scenarioOld.DynamicCommandBlock); - mapGroupsOld = CreateGameUnits(unitStatusOld); + mapGroupsOld = CreateGameUnits(unitStatusOld); - foreach(var mapGroup in mapGroupsOld) - { - Debug.Log($"viewMap.Count={viewMap.Count}, viewMap.ContainsKey(mapGroup)={viewMap.ContainsKey(mapGroup)}"); - var view = viewMap[mapGroup]; - view.SetOld(1); + foreach (var mapGroup in mapGroupsOld) + { + // Debug.Log($"viewMap.Count={viewMap.Count}, viewMap.ContainsKey(mapGroup)={viewMap.ContainsKey(mapGroup)}"); + var view = viewMap[mapGroup]; + view.SetOld(1); + + } + + foreach (var mapGroupNewOldPair in MatchMapGroups()) + { + var mapGroup = mapGroupNewOldPair.Item1; + var mapGroupOld = mapGroupNewOldPair.Item2; + var maneuverLinePrefab = mapGroup.MapUnits[0].UnitState.OobItem.Country == "French" ? ManeuverLineFrenchPrefab : ManeuverLineAlliedPrefab; // TODO: Supports more color. + var center = mapGroup.GetCenter(); + var centerOld = mapGroupOld.GetCenter(); + + // Debug.Log($"mapGroup.Name2={mapGroup.Name2}, mapGroupOld.Name2={mapGroupOld.Name2}, center={center}, centerOld={centerOld}"); + + if ((center[0] - centerOld[0]) != 0 || (center[1] - centerOld[1]) != 0) + { + var lineObj = Instantiate(maneuverLinePrefab, ManeuverLineContainer.transform); + var line = lineObj.GetComponent(); + line.SetPositions(new Vector3[] { new Vector3(centerOld[0], centerOld[1], -1), new Vector3(center[0], center[1], -1) }); + + lineViewMap[mapGroupNewOldPair] = line; + } + + } } } @@ -269,7 +346,7 @@ void CreateGameUnit(MapGroupAdaptor mapGroup, GameObject prefab) var scaleX = Mathf.Max(1, (float)rect.WidthMain * 3); var scaleY = 1; - // var scaleY = (float)rect.WidthSub; + // var scaleY = Mathf.Max(1, (float)rect.WidthSub); gameUnit.SetSize(scaleX, scaleY); gameUnit.SetRotation((float)deg); @@ -295,7 +372,7 @@ void CreateGameUnit(MapGroupAdaptor mapGroup, GameObject prefab) gameUnit.SetUnitCategory(1); } - if (!showIndependentArtillery && mapGroup.IsArtilleryGroup()) + if (!showIndependentArtillery && mapGroup.IsArtilleryGroup()) // TODO: Since artillery units are usually used in detached state which break formation shape estimation, maybe add an option that just ignores all artillery unit? { gameUnit.gameObject.SetActive(false); } @@ -322,8 +399,13 @@ public void Reset() { Destroy(gameUnit.gameObject); } + foreach(var line in lineViewMap.Values) + { + Destroy(line.gameObject); + } viewMap.Clear(); modelMap.Clear(); + lineViewMap.Clear(); unitGroup = null; mapGroups = null; diff --git a/Assets/Scripts/GameUnit.cs b/Assets/Scripts/GameUnit.cs index 24db9e3..2923492 100644 --- a/Assets/Scripts/GameUnit.cs +++ b/Assets/Scripts/GameUnit.cs @@ -64,16 +64,24 @@ public void SetOld(int mode) baseRectRenderer.material.SetInt("_Old", mode); directionRectRenderer.material.SetInt("_Old", mode); - if(mode == 1) + if (mode == 1) { text.gameObject.SetActive(false); + SetRectDepth(1); } else { text.gameObject.SetActive(true); + SetRectDepth(0); } } + void SetRectDepth(float depth) + { + BaseRect.transform.position = new Vector3(BaseRect.transform.position.x, BaseRect.transform.position.y, depth); + DirectionRect.transform.position = new Vector3(DirectionRect.transform.position.x, DirectionRect.transform.position.y, depth); + } + /* public void SetUnitDirection() { diff --git a/Assets/Scripts/LoadTextButton.cs b/Assets/Scripts/LoadTextButton.cs index 634f1f8..233eed3 100644 --- a/Assets/Scripts/LoadTextButton.cs +++ b/Assets/Scripts/LoadTextButton.cs @@ -4,6 +4,7 @@ using UnityEngine.Networking; using System.IO; using TMPro; +using System.Linq; #if UNITY_EDITOR using UnityEditor; @@ -46,6 +47,7 @@ public void OnPressed() #endif // TODO: Add File Browser Supporting for other plateforms other than WebGL // Consider: https://assetstore.unity.com/packages/tools/gui/runtime-file-browser-113006 + var _extentions = string.Join(",", extention.Split(",").Select(s => $".{s}")); // "scn,btl" => ".scn,.btl" FileUploaderHelper.RequestFile((path) => { Debug.Log($"path={path}"); @@ -53,7 +55,8 @@ public void OnPressed() return; StartCoroutine(UploadText(path)); - }, ".oob"); + }, _extentions); + // }, ".oob"); #if UNITY_EDITOR } #endif diff --git a/Assets/Scripts/PlotManager.cs b/Assets/Scripts/PlotManager.cs index 4c28f3f..6ee1b0f 100644 --- a/Assets/Scripts/PlotManager.cs +++ b/Assets/Scripts/PlotManager.cs @@ -48,6 +48,7 @@ public void SwapStates() var t = ScnInputField.text; ScnInputField.text = ScnOldInputField.text; ScnOldInputField.text = t; - PlotComparison(); + if(ScnInputField.text != null && ScnInputField.text != "" && ScnOldInputField.text != null && ScnOldInputField.text != "") + PlotComparison(); } } diff --git a/Assets/Shaders/ManeuverLine.shader b/Assets/Shaders/ManeuverLine.shader new file mode 100644 index 0000000..a37c44d --- /dev/null +++ b/Assets/Shaders/ManeuverLine.shader @@ -0,0 +1,71 @@ +Shader "Unlit/ManeuverLine" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", Color) = (0.5, 0.5, 0.5, 1) + } + SubShader + { + // Tags { "RenderType"="Opaque" } + Tags {"Queue" = "Transparent" "RenderType" = "Transparent"} + LOD 100 + Blend SrcAlpha OneMinusSrcAlpha + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + float4 _Color; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = TRANSFORM_TEX(v.uv, _MainTex); + UNITY_TRANSFER_FOG(o,o.vertex); + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + // sample the texture + // fixed4 col = tex2D(_MainTex, i.uv); + fixed4 col; + if (i.uv.x % 0.1 < 0.05) + { + col = fixed4(0, 0, 0, 0); + } + else { + col = fixed4(_Color.r, _Color.g, _Color.b, 0.5); + } + + // apply fog + UNITY_APPLY_FOG(i.fogCoord, col); + return col; + } + ENDCG + } + } +} diff --git a/Assets/Shaders/ManeuverLine.shader.meta b/Assets/Shaders/ManeuverLine.shader.meta new file mode 100644 index 0000000..6fa69d8 --- /dev/null +++ b/Assets/Shaders/ManeuverLine.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8a2bbe4bd2924bb4792203c78b6985c1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 5511ef1..ad949a2 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -12,7 +12,7 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany + companyName: January Desk productName: JTSCombatMapTool defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.0 + bundleVersion: 0.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -568,7 +568,7 @@ PlayerSettings: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 0 + webGLCompressionFormat: 1 webGLWasmArithmeticExceptions: 0 webGLLinkerTarget: 1 webGLThreadsSupport: 0 @@ -585,7 +585,7 @@ PlayerSettings: allowUnsafeCode: 0 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 0 + selectedPlatform: 2 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1 diff --git a/readme.md b/readme.md index 62b0530..6ba112d 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ JTS games have many counters and big maps, so sometimes it's hard to grasp the situation, for yourself or readers of your AAR! So I made the tool. Now, it supports JTS/WDS Napoleonic Battles title (I tested it only on [Wellington's Peninsular War](https://wargameds.com/collections/napoleonic-battles/products/wellingtons-peninsular-war) and [The Final Struggle](https://wargameds.com/collections/napoleonic-battles/products/the-final-struggle)). It should support other titles of NB if they have the same data structure. -The civil war series may be supported in the near future since they should have a similar data structure but I have not done the research. +The Civil War Battles series may be supported in the near future since they should have a similar data structure but I have not done the research. ## Motivation