调整大地图样式和地球样式

This commit is contained in:
suntao 2021-04-30 23:58:11 +08:00
parent 392eca5dc2
commit 071a0e1170
6 changed files with 726 additions and 395 deletions

View File

@ -980,12 +980,12 @@ MonoBehaviour:
_initializeOnStart: 1
_imagery:
_layerProperty:
sourceType: 2
sourceType: 6
sourceOptions:
isActive: 1
layerSource:
Name: Dark
Id: mapbox://styles/mapbox/dark-v9
Id: mapbox://styles/juzetest/ckmkdjwsa1nvt17nr1ps4fqgs
Modified:
UserName:
rasterOptions:
@ -1610,12 +1610,12 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -1625,7 +1625,7 @@ PrefabInstance:
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -9
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8688565590564084001, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
type: 3}
@ -1720,12 +1720,12 @@ PrefabInstance:
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1735,7 +1735,7 @@ PrefabInstance:
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -9
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2194771378174845541, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1905,12 +1905,12 @@ PrefabInstance:
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1920,7 +1920,7 @@ PrefabInstance:
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -9
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6549425620798886645, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1935,12 +1935,12 @@ PrefabInstance:
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1950,17 +1950,17 @@ PrefabInstance:
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -9
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
@ -1970,7 +1970,7 @@ PrefabInstance:
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -2
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9135822971364406318, guid: a1999d0576fee6248a9c5a507ae8d10e,
type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -653,7 +653,7 @@ Light:
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 0.93333334, g: 0.9019608, b: 0.90588236, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
@ -710,13 +710,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873388893}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalRotation: {x: 0.6830127, y: -0.18301266, z: 0.18301266, w: 0.6830127}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_LocalEulerAnglesHint: {x: 90, y: -30, z: 0}
--- !u!1 &1378474435
GameObject:
m_ObjectHideFlags: 0

View File

@ -70,15 +70,17 @@ public class BigMapController : PFUIPanel
IEnumerator Main()
{
mapManager = this.transform.Find("Map").GetComponent<AbstractMap>();
mapManager.MaxZoom = 4;
//mapManager.MaxZoom = 4;
mapManager.OnInitialized += MapManager_OnInitialized;
mapManager.OnUpdated += MapManager_OnUpdated;
//// mapManager.OnTileFinished += MapManager_OnTileFinished;
mapManager.SetZoom(5.8f);
//mapManager.SetZoom(5.8f);
//mapManager.SetCenterLatitudeLongitude(new Mapbox.Utils.Vector2d(32.051203, 118.771572));
this.transform.Find("Map").GetComponent<QuadTreeCameraMovement>()._referenceCamera = Camera.main;
canvas = this.transform.Find("Canvas").gameObject;
canvas.GetComponent<Canvas>().worldCamera = Camera.main;
@ -167,14 +169,17 @@ public class BigMapController : PFUIPanel
//Debug.Log(infoStr);
var info = Newtonsoft.Json.Linq.JObject.Parse(infoStr);
var center = (info["features"] as JArray).First()["center"];
mapManager.UpdateMap(new Vector2d(Convert.ToDouble(center[1]), Convert.ToDouble(center[0])));
var features = (info["features"] as JArray);
if (features.Count > 0) {
var center = features.First()["center"];
mapManager.UpdateMap(new Vector2d(Convert.ToDouble(center[1]), Convert.ToDouble(center[0])));
}
UIManager.HideLoadingDialogBox();
}
private void MapManager_OnInitialized()
{
mapManager.UpdateMap(5.8f);
Load();
}
private void MapManager_OnUpdated()

View File

@ -7,6 +7,7 @@ using UnityEngine.UI;
using Assets.Scripts.Apis;
using Newtonsoft.Json.Linq;
using Assets.Scripts;
using UnityEngine.EventSystems;
public class EarthController : PFUIPanel
{
@ -61,7 +62,17 @@ public class EarthController : PFUIPanel
panel = rootPanel.Find("Panel").gameObject;
SetRounded(panel.transform, 60);
panel.gameObject.SetActive(false);
var goList = rootPanel.transform.Find("SwitchMode");
SetRounded(goList, 64);
UIManager.AddEvent(goList.Find("GoList").gameObject, EventTriggerType.PointerClick, (e) =>
{
//UIManager.PopStack();
UIManager.ShowMapListPanel();
//this.gameObject.SetActive(false);
//DestroyImmediate(this.gameObject);
});
maskImage = rootPanel.Find("MaskImage").GetComponent<RawImage>();
@ -85,7 +96,7 @@ public class EarthController : PFUIPanel
Camera.main.transform.rotation = Quaternion.Euler(0, 0, 0);
map.SetZoomLevel(1.43f);
map.SetZoomLevel(2.6f);
//var zoom = map.GetZoomLevel();
//Debug.Log(zoom);
map.OnZoomStart += Map_OnZoomStart;
@ -139,8 +150,12 @@ public class EarthController : PFUIPanel
var latLon = province.latlonCenter;
EnterBigMap(latLon);
};
}
skybox = Camera.main.GetComponent<Skybox>();
Debug.Log(skybox != null);
}
private float rot = 0;
Skybox skybox;
/// <summary>
/// 显示概要信息
/// </summary>
@ -246,6 +261,10 @@ public class EarthController : PFUIPanel
}
}
//Debug.Log(showSummary + "," + time);
//rot += 0.1f * Time.deltaTime;
//rot %= 360;
//skybox.material.SetFloat("_Rotation", rot);
}
public void Show(double lat, double lon)

View File

@ -483,7 +483,7 @@ public class UIManager : MonoBehaviour
EventTrigger.Entry pointerEvent = new EventTrigger.Entry();
pointerEvent.eventID = eventTriggerType;
pointerEvent.callback.AddListener((e)=> {
if (gameObject.activeInHierarchy == false) return;
if (gameObject == null || gameObject.activeInHierarchy == false) return;
var btn = gameObject.GetComponent<Button>();
if(btn != null && btn.enabled == false)
{