diff --git a/Assets/GFX/Shaders/FaWater.shader b/Assets/GFX/Shaders/FaWater.shader index 807fa03f..085fe636 100644 --- a/Assets/GFX/Shaders/FaWater.shader +++ b/Assets/GFX/Shaders/FaWater.shader @@ -130,7 +130,7 @@ Shader "MapEditor/FaWater" { //o.mScreenPos.xy /= o.mScreenPos.w; o.mViewVec = mul (unity_ObjectToWorld, v.vertex).xyz - _WorldSpaceCameraPos; - //o.mViewVec = normalize(o.mViewVec); + o.mViewVec = normalize(o.mViewVec); o.AddVar = float4(length(_WorldSpaceCameraPos - mul(unity_ObjectToWorld, v.vertex).xyz), 0, 0, 0); float4 hpos = UnityObjectToClipPos (v.vertex); o.grabUV = ComputeGrabScreenPos(hpos); diff --git a/Assets/GFX/Shaders/UnitShader.shader b/Assets/GFX/Shaders/UnitShader.shader index 58f07aaa..62648c03 100644 --- a/Assets/GFX/Shaders/UnitShader.shader +++ b/Assets/GFX/Shaders/UnitShader.shader @@ -10,12 +10,12 @@ Shader "Custom/UnitShader" { //_Metallic ("Metallic", Range(0,1)) = 0.0 } SubShader { - Tags { "RenderType"="TransparentCutout" "Queue" = "Geometry" } + Tags { "RenderType"="TransparentCutout" "Queue" = "Transparent+2" } LOD 200 CGPROGRAM // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf BlinnPhong addshadow + #pragma surface surf BlinnPhong vertex:vert addshadow // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 @@ -23,15 +23,26 @@ Shader "Custom/UnitShader" { sampler2D _MainTex, _BumpMap, _SpecTeam; struct Input { float2 uv_MainTex; + float3 mViewVec : TEXCOORD5; + float3 worldNormal; + INTERNAL_DATA }; - //fixed4 _SunColor; + fixed4 _SunColor; //fixed4 _SunAmbience; //fixed4 _ShadowColor; + + void vert(inout appdata_full v, out Input o) { + UNITY_INITIALIZE_OUTPUT(Input, o); + o.mViewVec = normalize(mul(unity_ObjectToWorld, v.vertex).xyz - _WorldSpaceCameraPos); + } + //half _Glossiness; //half _Metallic; fixed4 _Color; + uniform float3 SunDirection; + uniform samplerCUBE environmentSampler; // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. @@ -50,28 +61,44 @@ Shader "Custom/UnitShader" { return normal.xzy; } + static const float3 NormalMappedPhongCoeff = float3(0.6, 0.80, 0.90); + void surf (Input IN, inout SurfaceOutput o) { + + + + + // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex); - o.Albedo = c.rgb; + fixed4 albedo = tex2D (_MainTex, IN.uv_MainTex); fixed4 bump = tex2D(_BumpMap, IN.uv_MainTex); //B - //A - - o.Normal = UnpackNormalDXT5nm(bump); - + o.Normal = UnpackNormalDXT5nm(bump); - fixed4 s = tex2D(_SpecTeam, IN.uv_MainTex); + float3 WorldSpaceNormal = WorldNormalVector(IN, o.Normal); + + fixed4 specular = tex2D(_SpecTeam, IN.uv_MainTex); //R //G //B - //A - Team + float dotLightNormal = dot(SunDirection, o.Normal); - o.Albedo += s.a * _Color.rgb; - o.Specular = 1; - o.Gloss = 0.1; - o.Emission = s.b * 4 * c.rgb; + float3 environment = texCUBE(environmentSampler, reflect(-IN.mViewVec, WorldSpaceNormal)); + + float phongAmount = saturate(dot(reflect(SunDirection, WorldSpaceNormal), -IN.mViewVec)); + float3 phongAdditive = NormalMappedPhongCoeff * pow(phongAmount, 2) * specular.g; + float3 phongMultiplicative = clamp(float3(environment * specular.r) * Luminance(_Color.rgb), 0, 2); + + o.Albedo = lerp(_Color.rgb, albedo.rgb * 0.7, 1 - specular.a); + + o.Specular = specular.g; + o.Gloss = 0.1; + o.Emission = specular.b * 4 * albedo.rgb + phongAdditive * 2 * _SunColor + phongMultiplicative; + //o.Emission = environment; } ENDCG } diff --git a/Assets/MapEditor.unity b/Assets/MapEditor.unity index 2c588b27..33b47a45 100644 --- a/Assets/MapEditor.unity +++ b/Assets/MapEditor.unity @@ -749,6 +749,108 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_ShowMaskGraphic: 0 +--- !u!1 &10785237 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 10785238} + - component: {fileID: 10785241} + - component: {fileID: 10785240} + - component: {fileID: 10785239} + m_Layer: 5 + m_Name: Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &10785238 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 10785237} + 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: 1799158191} + - {fileID: 2106723330} + m_Father: {fileID: 1626244006} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 0, y: 500} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &10785239 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 10785237} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 2065549808} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 20 + m_Viewport: {fileID: 1799158191} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 2106723331} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &10785240 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 10785237} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c8be034c0fbf7ea4f813b3c9dcd0e079, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &10785241 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 10785237} --- !u!1001 &10853859 Prefab: m_ObjectHideFlags: 0 @@ -15482,6 +15584,37 @@ MonoBehaviour: - {fileID: 36541213} - {fileID: 613719202} - {fileID: 2021823474} +--- !u!84 &205513180 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + m_Width: 256 + m_Height: 256 + m_AntiAliasing: 1 + m_DepthFormat: 1 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_BindMS: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 --- !u!1 &205678020 GameObject: m_ObjectHideFlags: 0 @@ -30932,7 +31065,7 @@ Prefab: - target: {fileID: 114173077333384758, guid: 30131436e7e207b4f82d0dedb78a89a4, type: 2} propertyPath: m_MinValue - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 30131436e7e207b4f82d0dedb78a89a4, type: 2} @@ -37849,7 +37982,7 @@ Camera: serializedVersion: 2 m_Bits: 2560 m_RenderingPath: 1 - m_TargetTexture: {fileID: 2110974772} + m_TargetTexture: {fileID: 205513180} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 0 @@ -52073,6 +52206,8 @@ RectTransform: m_Children: - {fileID: 184184071} - {fileID: 1869176137} + - {fileID: 1155566677} + - {fileID: 1626244006} m_Father: {fileID: 1998672366} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -53007,6 +53142,40 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &762930069 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 762930070} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &762930070 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 762930069} + 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: 1902334965} + m_Father: {fileID: 2106723330} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &766373636 stripped MonoBehaviour: m_PrefabParentObject: {fileID: 114511835120566654, guid: 42ecef83ed2fc73438f171b60a7ecf23, @@ -58617,6 +58786,74 @@ MonoBehaviour: Transform: m_PrefabParentObject: {fileID: 400000, guid: 300416dc2d5756d4384b2db186436554, type: 3} m_PrefabInternal: {fileID: 325532675} +--- !u!1 &860126908 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 860126909} + - component: {fileID: 860126911} + - component: {fileID: 860126910} + m_Layer: 5 + m_Name: Item Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &860126909 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 860126908} + 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: [] + m_Father: {fileID: 953694776} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -2, y: 0} + m_SizeDelta: {x: -2, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &860126910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 860126908} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0.53200006, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 64a6191ada4e90446bb848c4d4d395a8, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &860126911 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 860126908} --- !u!1 &861587712 GameObject: m_ObjectHideFlags: 0 @@ -65561,6 +65798,88 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 953143309} +--- !u!1 &953694775 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 953694776} + - component: {fileID: 953694777} + m_Layer: 5 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &953694776 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953694775} + 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: 1439155851} + - {fileID: 860126909} + - {fileID: 1490250402} + m_Father: {fileID: 2065549808} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &953694777 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953694775} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1439155852} + toggleTransition: 1 + graphic: {fileID: 860126910} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IsOn: 1 --- !u!1 &954010200 GameObject: m_ObjectHideFlags: 0 @@ -78860,6 +79179,80 @@ RectTransform: m_AnchoredPosition: {x: -18.299988, y: -5.7999268} m_SizeDelta: {x: 15, y: -5.7999} m_Pivot: {x: 0, y: 1} +--- !u!1 &1155566676 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1155566677} + - component: {fileID: 1155566679} + - component: {fileID: 1155566678} + m_Layer: 5 + m_Name: Text (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1155566677 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1155566676} + 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: [] + m_Father: {fileID: 753343972} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 293.29993, y: 0} + m_SizeDelta: {x: 100, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1155566678 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1155566676} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: ba878bb41b1a125448c85ae6644d5b6a, type: 3} + m_FontSize: 12 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Players +--- !u!222 &1155566679 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1155566676} --- !u!1 &1155952397 GameObject: m_ObjectHideFlags: 0 @@ -86778,6 +87171,15 @@ MonoBehaviour: HeightmapPaintStrength: serializedVersion: 2 m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 1 value: 0.5 @@ -89396,6 +89798,7 @@ MonoBehaviour: Desc: {fileID: 1365764493} TextureSet: {fileID: 196727558} MapType: {fileID: 184184072} + ArmyCount: {fileID: 1626244007} Width: {fileID: 1436263530} Height: {fileID: 848750899} InitialHeight: {fileID: 366614438} @@ -99204,6 +99607,74 @@ CanvasGroup: m_Interactable: 0 m_BlocksRaycasts: 0 m_IgnoreParentGroups: 0 +--- !u!1 &1439155850 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1439155851} + - component: {fileID: 1439155853} + - component: {fileID: 1439155852} + m_Layer: 5 + m_Name: Item Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1439155851 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1439155850} + 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: [] + m_Father: {fileID: 953694776} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1439155852 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1439155850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.11870695, g: 0.11870695, b: 0.13725491, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1439155853 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1439155850} --- !u!1 &1444107165 GameObject: m_ObjectHideFlags: 0 @@ -102241,6 +102712,80 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1489475573} +--- !u!1 &1490250401 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1490250402} + - component: {fileID: 1490250404} + - component: {fileID: 1490250403} + m_Layer: 5 + m_Name: Item Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1490250402 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1490250401} + 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: [] + m_Father: {fileID: 953694776} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1490250403 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1490250401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: ba878bb41b1a125448c85ae6644d5b6a, type: 3} + m_FontSize: 12 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Option A +--- !u!222 &1490250404 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1490250401} --- !u!1 &1490705006 GameObject: m_ObjectHideFlags: 0 @@ -112521,6 +113066,159 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 238} m_SizeDelta: {x: 590, y: 70} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1626244005 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1626244006} + - component: {fileID: 1626244009} + - component: {fileID: 1626244008} + - component: {fileID: 1626244007} + m_Layer: 5 + m_Name: Dropdown (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1626244006 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1626244005} + 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: 1821636113} + - {fileID: 2043943541} + - {fileID: 10785238} + m_Father: {fileID: 753343972} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 170, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &1626244007 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1626244005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 853051423, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1626244008} + m_Template: {fileID: 10785238} + m_CaptionText: {fileID: 1821636114} + m_CaptionImage: {fileID: 0} + m_ItemText: {fileID: 1490250403} + m_ItemImage: {fileID: 0} + m_Value: 1 + m_Options: + m_Options: + - m_Text: 1 + m_Image: {fileID: 0} + - m_Text: 2 + m_Image: {fileID: 0} + - m_Text: 3 + m_Image: {fileID: 0} + - m_Text: 4 + m_Image: {fileID: 0} + - m_Text: 5 + m_Image: {fileID: 0} + - m_Text: 6 + m_Image: {fileID: 0} + - m_Text: 7 + m_Image: {fileID: 0} + - m_Text: 8 + m_Image: {fileID: 0} + - m_Text: 9 + m_Image: {fileID: 0} + - m_Text: 10 + m_Image: {fileID: 0} + - m_Text: 11 + m_Image: {fileID: 0} + - m_Text: 12 + m_Image: {fileID: 0} + - m_Text: 13 + m_Image: {fileID: 0} + - m_Text: 14 + m_Image: {fileID: 0} + - m_Text: 15 + m_Image: {fileID: 0} + - m_Text: 16 + m_Image: {fileID: 0} + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1626244008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1626244005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.1102941, g: 0.1102941, b: 0.1102941, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: d3aa288051d5dba4abe2dc3088e14e7e, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1626244009 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1626244005} --- !u!1 &1629406097 GameObject: m_ObjectHideFlags: 0 @@ -122089,6 +122787,88 @@ RectTransform: m_AnchoredPosition: {x: -5, y: 0} m_SizeDelta: {x: -20, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1799158190 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1799158191} + - component: {fileID: 1799158194} + - component: {fileID: 1799158193} + - component: {fileID: 1799158192} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1799158191 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1799158190} + 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: 2065549808} + m_Father: {fileID: 10785238} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -12, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1799158192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1799158190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1799158193 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1799158190} +--- !u!114 &1799158194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1799158190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 --- !u!1 &1800352888 GameObject: m_ObjectHideFlags: 0 @@ -123422,6 +124202,80 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1819712173} +--- !u!1 &1821636112 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1821636113} + - component: {fileID: 1821636115} + - component: {fileID: 1821636114} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1821636113 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1821636112} + 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: [] + m_Father: {fileID: 1626244006} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -7.5000305, y: 0} + m_SizeDelta: {x: -35, y: -8} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1821636114 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1821636112} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: ba878bb41b1a125448c85ae6644d5b6a, type: 3} + m_FontSize: 12 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 2 +--- !u!222 &1821636115 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1821636112} --- !u!1001 &1821719591 Prefab: m_ObjectHideFlags: 0 @@ -129040,6 +129894,74 @@ RectTransform: m_PrefabParentObject: {fileID: 224654035474944384, guid: b68527975f2edce489c9336fa9650c39, type: 2} m_PrefabInternal: {fileID: 1900841263} +--- !u!1 &1902334964 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1902334965} + - component: {fileID: 1902334967} + - component: {fileID: 1902334966} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1902334965 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902334964} + 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: [] + m_Father: {fileID: 762930070} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1902334966 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902334964} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c8be034c0fbf7ea4f813b3c9dcd0e079, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1902334967 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902334964} --- !u!1 &1903389999 GameObject: m_ObjectHideFlags: 0 @@ -138246,6 +139168,74 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2041020545} +--- !u!1 &2043943540 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2043943541} + - component: {fileID: 2043943543} + - component: {fileID: 2043943542} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2043943541 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2043943540} + 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: [] + m_Father: {fileID: 1626244006} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2043943542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2043943540} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2043943543 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2043943540} --- !u!1 &2047154357 GameObject: m_ObjectHideFlags: 0 @@ -139476,6 +140466,40 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 2064009597} +--- !u!1 &2065549807 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2065549808} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2065549808 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2065549807} + 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: 953694776} + m_Father: {fileID: 1799158191} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 1.300003, y: 0} + m_SizeDelta: {x: -2.6, y: 28} + m_Pivot: {x: 0.5, y: 1} --- !u!1 &2065632019 GameObject: m_ObjectHideFlags: 0 @@ -141745,6 +142769,122 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 3c8d02b1af1985b41a27be31b50983d3, type: 2} m_IsPrefabParent: 0 +--- !u!1 &2106723329 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2106723330} + - component: {fileID: 2106723333} + - component: {fileID: 2106723332} + - component: {fileID: 2106723331} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2106723330 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106723329} + 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: 762930070} + m_Father: {fileID: 10785238} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 15, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &2106723331 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106723329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1902334966} + m_HandleRect: {fileID: 1902334965} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &2106723332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106723329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 004fcd85e90bb654392361e14a461b0a, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2106723333 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106723329} --- !u!1001 &2109718628 Prefab: m_ObjectHideFlags: 0 @@ -142115,37 +143255,6 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 3c8d02b1af1985b41a27be31b50983d3, type: 2} m_IsPrefabParent: 0 ---- !u!84 &2110974772 -RenderTexture: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: - m_ImageContentsHash: - serializedVersion: 2 - Hash: 00000000000000000000000000000000 - m_ForcedFallbackFormat: 4 - m_DownscaleFallback: 0 - m_Width: 256 - m_Height: 256 - m_AntiAliasing: 1 - m_DepthFormat: 1 - m_ColorFormat: 0 - m_MipMap: 0 - m_GenerateMips: 1 - m_SRGB: 0 - m_UseDynamicScale: 0 - m_BindMS: 0 - m_TextureSettings: - serializedVersion: 2 - m_FilterMode: 1 - m_Aniso: 0 - m_MipBias: 0 - m_WrapU: 1 - m_WrapV: 1 - m_WrapW: 1 - m_Dimension: 2 - m_VolumeDepth: 1 --- !u!1 &2112332216 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/HazardX SCMAP Code/Map.cs b/Assets/Scripts/HazardX SCMAP Code/Map.cs index 70e71f61..f21d3d6a 100644 --- a/Assets/Scripts/HazardX SCMAP Code/Map.cs +++ b/Assets/Scripts/HazardX SCMAP Code/Map.cs @@ -167,6 +167,7 @@ public Map() } + const double HeightResize = 128.0 * 256.0; //512 * 40; public Map(int _Width, int _Height, int InitialHeight, bool _Water, int WaterLevel, int DepthLevel, int AbyssLevel) { Width = _Width; @@ -219,8 +220,18 @@ public Map(int _Width, int _Height, int InitialHeight, bool _Water, int WaterLev WaterFoamMask[i] = 0; } - for(int i = 0; i < HeightmapData.Length; i++) - HeightmapData[i] = (short)InitialHeight; + + float HeightConversion = InitialHeight / 25.6f; + HeightConversion /= 10f; + + + short InitialHeightValue = (short)((HeightConversion * HeightResize) + 0.5f); + Debug.Log(InitialHeightValue); + + for (int i = 0; i < HeightmapData.Length; i++) + { + HeightmapData[i] = InitialHeightValue; + } //Version diff --git a/Assets/Scripts/Ozone SCMAP Code/GetGamedataFile/UnitSource.cs b/Assets/Scripts/Ozone SCMAP Code/GetGamedataFile/UnitSource.cs index 8b0f08ac..25309b7e 100644 --- a/Assets/Scripts/Ozone SCMAP Code/GetGamedataFile/UnitSource.cs +++ b/Assets/Scripts/Ozone SCMAP Code/GetGamedataFile/UnitSource.cs @@ -139,7 +139,7 @@ void OnDisable() Culling.Dispose(); } - public void CreateUnitObject(MapLua.SaveLua.Army.Unit Source, MapLua.SaveLua.Army.UnitsGroup Group) + public UnitInstance CreateUnitObject(MapLua.SaveLua.Army.Unit Source, MapLua.SaveLua.Army.UnitsGroup Group) { Vector3 position = ScmapEditor.ScmapPosToWorld(Source.Position); Quaternion rotation = Quaternion.Euler(Source.Orientation); @@ -151,6 +151,7 @@ public void CreateUnitObject(MapLua.SaveLua.Army.Unit Source, MapLua.SaveLua.Arm UnitInstance UInst = Obj.GetComponent(); //UInst.Owner = Owner; UInst.Group = Group; + Group.UnitInstances.Add(UInst); UInst.orders = Source.orders; UInst.platoon = Source.platoon; UInst.UnitRenderer = this; @@ -163,7 +164,7 @@ public void CreateUnitObject(MapLua.SaveLua.Army.Unit Source, MapLua.SaveLua.Arm UInst.Col.center = Vector3.up * (BP.Size.y * 0.05f); AddInstance(UInst); - + return UInst; } public void AddInstance(UnitInstance UInst, bool ForcedLod = false) diff --git a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua.cs b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua.cs index 93439746..384082a7 100644 --- a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua.cs +++ b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua.cs @@ -277,7 +277,6 @@ public void Save(string Path) { for(int a = 0; a < Data.areas.Length; a++) { - //TODO LuaFile.OpenTab(LuaParser.Write.PropertieToLua(Data.areas[a].Name) + LuaParser.Write.OpenBracketValue); LuaFile.AddLine(LuaParser.Write.RectangleToLua(LuaParser.Write.PropertieToLua(Areas.KEY_RECTANGLE), Data.areas[a].rectangle)); LuaFile.CloseTab(LuaParser.Write.EndBracketNext); @@ -354,6 +353,8 @@ public void Save(string Path) LuaFile.AddLine(LuaParser.Write.StringToLua(Scenario.KEY_NEXTPLATOONID, Data.next_platoon_id.ToString())); + Debug.Log(Data.MasterChains[0].Markers.Count); + //Platoons LuaFile.AddSaveComent(""); LuaFile.AddSaveComent("Platoons"); diff --git a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Army.cs b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Army.cs index 07a2ca49..40f3ff7f 100644 --- a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Army.cs +++ b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Army.cs @@ -137,6 +137,8 @@ public void SaveUnitsGroup(LuaParser.Creator LuaFile) { Unit.SaveUnit(LuaFile, u); } + + LuaFile.CloseTab(LuaParser.Write.EndBracketNext); LuaFile.CloseTab(LuaParser.Write.EndBracketNext); @@ -161,7 +163,7 @@ public static void SaveUnit(LuaParser.Creator LuaFile, UnitInstance Instance) LuaFile.AddLine(LuaParser.Write.StringToLua(UnitsGroup.KEY_TYPE, Instance.UnitRenderer.BP.CodeName)); LuaFile.AddLine(LuaParser.Write.StringToLua(UnitsGroup.KEY_ORDERS, Instance.orders)); LuaFile.AddLine(LuaParser.Write.StringToLua(UnitsGroup.KEY_PLATOON, Instance.platoon)); - LuaFile.AddLine(LuaParser.Write.Vector3ToLua(UnitsGroup.KEY_POSITION, Instance.transform.localPosition)); + LuaFile.AddLine(LuaParser.Write.Vector3ToLua(UnitsGroup.KEY_POSITION, ScmapEditor.WorldPosToScmap(Instance.transform.localPosition))); LuaFile.AddLine(LuaParser.Write.Vector3ToLua(UnitsGroup.KEY_ORIENTATION, Instance.transform.localEulerAngles)); LuaFile.CloseTab(LuaParser.Write.EndBracketNext); diff --git a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Marker.cs b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Marker.cs index 24af4046..6a826f26 100644 --- a/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Marker.cs +++ b/Assets/Scripts/Ozone SCMAP Code/Lua/SaveLua_Marker.cs @@ -534,7 +534,6 @@ public bool IsOnWater() public void SaveMarkerValues(LuaParser.Creator LuaFile) { - if (MarkerType == MarkerTypes.AutoPathNode) { // Convert to Land/Amphibious/Naval markers diff --git a/Assets/Scripts/Ozone SCMAP Code/Lua/ScenarioLua.cs b/Assets/Scripts/Ozone SCMAP Code/Lua/ScenarioLua.cs index f35f15af..70668e2b 100644 --- a/Assets/Scripts/Ozone SCMAP Code/Lua/ScenarioLua.cs +++ b/Assets/Scripts/Ozone SCMAP Code/Lua/ScenarioLua.cs @@ -460,7 +460,7 @@ public bool Load(string FolderName, string ScenarioFileName, string FolderParent public void Save(string Path) { LuaParser.Creator LuaFile = new LuaParser.Creator(); - LuaFile.AddLine("version = 3"); + LuaFile.AddLine("version = 3 -- Lua Version. Dont touch this"); LuaFile.OpenTab(TABLE_SCENARIOINFO + LuaParser.Write.OpenBracketValue); diff --git a/Assets/Scripts/Ozone SCMAP Code/MapLuaParser.cs b/Assets/Scripts/Ozone SCMAP Code/MapLuaParser.cs index a860ed0f..75768d97 100644 --- a/Assets/Scripts/Ozone SCMAP Code/MapLuaParser.cs +++ b/Assets/Scripts/Ozone SCMAP Code/MapLuaParser.cs @@ -201,6 +201,19 @@ IEnumerator LoadingFile() } } string ScenarioText = System.IO.File.ReadAllText(LoadedMapFolderPath + ScenarioFileName + ".lua"); + + if (AllFilesExists && !ScenarioText.StartsWith("version = 3") && ScenarioText.StartsWith("version =")) + { + AllFilesExists = SearchForScenario(); + + if (!AllFilesExists) + { + Error = "Wrong scenario file version. Should be 3, is " + ScenarioText.Remove(11).Replace("version =", ""); + Debug.LogError(Error); + } + } + + if (AllFilesExists && !ScenarioText.StartsWith("version = 3")) { AllFilesExists = SearchForScenario(); diff --git a/Assets/Scripts/Ozone SCMAP Code/ScmapEditor.cs b/Assets/Scripts/Ozone SCMAP Code/ScmapEditor.cs index 83dc5634..19bff1ba 100644 --- a/Assets/Scripts/Ozone SCMAP Code/ScmapEditor.cs +++ b/Assets/Scripts/Ozone SCMAP Code/ScmapEditor.cs @@ -218,8 +218,25 @@ public IEnumerator LoadScmapFile() WaterMaterial.SetTexture("_Reflection", cb); */ - SetWaterTextures(); + for (int i = 0; i < map.EnvCubemapsFile.Length; i++) + { + if (map.EnvCubemapsName[i] == "") + { + + try + { + Cubemap EnvironmentReflection = GetGamedataFile.GetGamedataCubemap(GetGamedataFile.TexturesScd, map.EnvCubemapsFile[i]); + Shader.SetGlobalTexture("environmentSampler", EnvironmentReflection); + } + catch + { + WaterMaterial.SetTexture("environmentSampler", DefaultWaterSky); + } + } + } + + SetWaterTextures(); SetWater(); diff --git a/Assets/Scripts/Selection/SelectionManager_Symmetry.cs b/Assets/Scripts/Selection/SelectionManager_Symmetry.cs index f312a825..3d6ba971 100644 --- a/Assets/Scripts/Selection/SelectionManager_Symmetry.cs +++ b/Assets/Scripts/Selection/SelectionManager_Symmetry.cs @@ -22,6 +22,19 @@ public class SelectedObjects public Matrix4x4 SymmetryMatrix; public bool InverseRotation = false; + GameObject GetAffected(int i) + { + if (i < 0 || i >= Ids.Count) + return null; + + int Id = Ids[i]; + + if (Id < 0 || Id > Current.AffectedGameObjects.Length) + return null; + + return Current.AffectedGameObjects[Id]; + } + public void LoadSymetryIds() { Ids = new List(); @@ -151,7 +164,7 @@ public void OffsetPosition(Vector3 Offset) SelectionRings[i].transform.localPosition = NewPos; if (CustomSnapAction != null) { - CustomSnapAction(SelectionRings[i].transform, Current.AffectedGameObjects[Ids[i]]); + CustomSnapAction(SelectionRings[i].transform, GetAffected(i)); NewPos = SelectionRings[i].transform.localPosition; } @@ -170,7 +183,7 @@ public void OffsetPosition(Vector3 Offset) SelectionRings[i].transform.localPosition = NewPos; if(CustomSnapAction != null) { - CustomSnapAction(SelectionRings[i].transform, Current.AffectedGameObjects[Ids[i]]); + CustomSnapAction(SelectionRings[i].transform, GetAffected(i)); NewPos = SelectionRings[i].transform.localPosition; } @@ -197,7 +210,7 @@ public void OffsetRotation(Vector3 Around, Quaternion Offset) if (CustomSnapAction != null) { - CustomSnapAction(SelectionRings[i].transform, Current.AffectedGameObjects[Ids[i]]); + CustomSnapAction(SelectionRings[i].transform, GetAffected(i)); NewPos = SelectionRings[i].transform.localPosition; NewRot = SelectionRings[i].transform.localRotation; } @@ -235,7 +248,7 @@ public void OffsetScale(Vector3 Around, Vector3 Offset) if (CustomSnapAction != null) { - CustomSnapAction(SelectionRings[i].transform, Current.AffectedGameObjects[Ids[i]]); + CustomSnapAction(SelectionRings[i].transform, GetAffected(i)); NewPos = SelectionRings[i].transform.localPosition; NewScale = SelectionRings[i].transform.localScale; } diff --git a/Assets/Scripts/UI/GenericPopup/GenericPopup.cs b/Assets/Scripts/UI/GenericPopup/GenericPopup.cs index b517e6f7..929674a5 100644 --- a/Assets/Scripts/UI/GenericPopup/GenericPopup.cs +++ b/Assets/Scripts/UI/GenericPopup/GenericPopup.cs @@ -129,19 +129,22 @@ void HidePopup() public void PressYes() { + if(PopupBufor[0].YesAction != null) PopupBufor[0].YesAction(); HidePopup(); } public void PressNo() { - PopupBufor[0].NoAction(); + if (PopupBufor[0].NoAction != null) + PopupBufor[0].NoAction(); HidePopup(); } public void PressCancel() { - PopupBufor[0].CancelAction(); + if (PopupBufor[0].CancelAction != null) + PopupBufor[0].CancelAction(); HidePopup(); } diff --git a/Assets/Scripts/UI/Tools/Units/UnitsInfo.cs b/Assets/Scripts/UI/Tools/Units/UnitsInfo.cs index be6c7354..53113702 100644 --- a/Assets/Scripts/UI/Tools/Units/UnitsInfo.cs +++ b/Assets/Scripts/UI/Tools/Units/UnitsInfo.cs @@ -100,8 +100,10 @@ public void SelectUnit() public void SnapAction(Transform tr, GameObject Connected) { UpdateSelectedMatrixes = true; - //tr.localPosition = ScmapEditor.SnapToTerrain(tr.localPosition); - tr.localPosition = Connected.GetComponent().GetSnapPosition(tr.localPosition); + if(Connected == null) + tr.localPosition = ScmapEditor.SnapToTerrain(tr.localPosition); + else + tr.localPosition = Connected.GetComponent().GetSnapPosition(tr.localPosition); } } diff --git a/Assets/Scripts/UI/Windows/NewMap.cs b/Assets/Scripts/UI/Windows/NewMap.cs index f83d8023..9e8135c2 100644 --- a/Assets/Scripts/UI/Windows/NewMap.cs +++ b/Assets/Scripts/UI/Windows/NewMap.cs @@ -15,6 +15,7 @@ public class NewMap : MonoBehaviour public UiTextField Desc; public Dropdown TextureSet; public Dropdown MapType; + public Dropdown ArmyCount; public Dropdown Width; public Dropdown Height; public UiTextField InitialHeight; @@ -81,7 +82,7 @@ public void CreateMap() { if (string.IsNullOrEmpty(Name.text)) { - // Show Error + GenericPopup.ShowPopup(GenericPopup.PopupTypes.OneButton, "Warning", "Name must not be empty!", "OK", null); return; } @@ -91,6 +92,7 @@ public void CreateMap() { Error = "Maps folder not exist: " + MapPath; Debug.LogError(Error); + GenericPopup.ShowPopup(GenericPopup.PopupTypes.OneButton, "Warning", "The map folder does not exist:\n" + MapPath, "OK", null); return; } @@ -103,7 +105,7 @@ public void CreateMap() { Error = "Map folder already exist: " + path; Debug.LogError(Error); - + GenericPopup.ShowPopup(GenericPopup.PopupTypes.OneButton, "Warning", "Map already exist: \n" + path, "OK", null); return; } @@ -135,9 +137,11 @@ public void CreateMap() MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0] = new MapLua.ScenarioLua.Team(); MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].name = "FFA"; MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys = new List(); - MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys.Add(new MapLua.ScenarioLua.Army("ARMY_1")); - MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys.Add(new MapLua.ScenarioLua.Army("ARMY_2")); + //MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys.Add(new MapLua.ScenarioLua.Army("ARMY_1")); + //MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys.Add(new MapLua.ScenarioLua.Army("ARMY_2")); MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].ExtraArmys = new List(); + MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].ExtraArmys.Add(new MapLua.ScenarioLua.Army("ARMY_17")); + MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].ExtraArmys.Add(new MapLua.ScenarioLua.Army("NEUTRAL_CIVILIAN")); MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].factions = new MapLua.ScenarioLua.Factions[0]; MapLuaParser.Current.ScenarioLuaFile.Data.name = Name.text; @@ -155,15 +159,37 @@ public void CreateMap() MapLuaParser.Current.SaveLuaFile.Data = new MapLua.SaveLua.Scenario(); - MapLuaParser.Current.SaveLuaFile.Data.MasterChains[0].Markers = new List(); + int Armies = ArmyCount.value + 1; + + float MapArmyDistance = NewMapWidth * 0.2f; + + + for (int i = 0; i < Armies; i++) + { + MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[0].Teams[0].Armys.Add(new MapLua.ScenarioLua.Army("ARMY_" + (i + 1))); + + MapLua.SaveLua.Marker A1marker = new MapLua.SaveLua.Marker(MapLua.SaveLua.Marker.MarkerTypes.BlankMarker, "ARMY_" + (i + 1)); + Vector3 ArmyPosition = new Vector3((int)(NewMapWidth * 0.5f), InitialHeight.intValue, (int)(NewMapWidth * 0.5f)); + ArmyPosition += Quaternion.Euler(Vector3.up * 360 * (i / (float)Armies)) * Vector3.forward * MapArmyDistance; + A1marker.position = ScmapEditor.WorldPosToScmap( ScmapEditor.SnapToGrid(ScmapEditor.ScmapPosToWorld(ArmyPosition))); + //Markers.MarkersControler.CreateMarker(A1marker, 0); + MapLuaParser.Current.SaveLuaFile.Data.MasterChains[0].Markers.Add(A1marker); + } + + Debug.Log(MapLuaParser.Current.SaveLuaFile.Data.MasterChains[0].Markers.Count); + + Markers.MarkersControler.LoadMarkers(); + + /* MapLua.SaveLua.Marker A1marker = new MapLua.SaveLua.Marker(MapLua.SaveLua.Marker.MarkerTypes.BlankMarker, "ARMY_1"); A1marker.position = new Vector3((int)(NewMapWidth * 0.25f), InitialHeight.intValue, (int)(NewMapWidth * 0.25f)); MapLuaParser.Current.SaveLuaFile.Data.MasterChains[0].Markers.Add(A1marker); MapLua.SaveLua.Marker A2marker = new MapLua.SaveLua.Marker(MapLua.SaveLua.Marker.MarkerTypes.BlankMarker, "ARMY_2"); A2marker.position = new Vector3((int)(NewMapWidth * 0.75f), InitialHeight.intValue, (int)(NewMapWidth * 0.75f)); MapLuaParser.Current.SaveLuaFile.Data.MasterChains[0].Markers.Add(A2marker); + */ MapLuaParser.Current.SaveLuaFile.Data.areas = new MapLua.SaveLua.Areas[1]; MapLuaParser.Current.SaveLuaFile.Data.areas[0] = new MapLua.SaveLua.Areas(); @@ -188,18 +214,22 @@ public void CreateMap() ScmapEditor.Current.map = new Map(MapLuaParser.Current.ScenarioLuaFile.Data.Size[0], MapLuaParser.Current.ScenarioLuaFile.Data.Size[1], InitialHeight.intValue, Water.isOn, WaterElv.intValue, DepthElevation.intValue, AbyssElevation.intValue); + GenerateControlTex.GenerateNormal(); + //GenerateControlTex.GenerateWater(); MapLuaParser.Current.SaveMap(false); MapLuaParser.Current.SaveScriptLua(0); - Debug.Log(FolderName); + + Invoke("FinishNewMap", 0.5f); + } + + void FinishNewMap() + { MapLuaParser.Current.LoadFile(); - Debug.Log(FolderName); gameObject.SetActive(false); } - - int SizeByValue(int value) { switch (value)