修复台湾问题;加服务器时间;

This commit is contained in:
suntao committed 2021-05-08 11:09:03 +08:00
1 parent 584cba79ae
commit 9a4e646a8f
12 files changed
+187 -34

No files matched your search

+43 -15
View File
@@ -8,8 +8,9 @@ public class LoadingPf : PFUIPanel
List<Sprite> sprites;
Image image;
protected override void Start()
protected override void Awake()
{
base.Awake();
sprites = new List<Sprite>();
for (int i = 1; i < 80; i++)
{
@@ -17,29 +18,56 @@ public class LoadingPf : PFUIPanel
}
image = transform.GetComponent<Image>();
}
protected override void Start()
{
}
int index = 0;
float time = 0;
//float time = 0;
public override void Show()
{
base.Show();
index = 0;
time = 0;
//time = 0;
StartCoroutine(Animation());
}
IEnumerator Animation()
{
for (; ; )
{
if (index % 79 == 0)
{
index = 0;
}
image.sprite = sprites[index];
index++;
yield return new WaitForSeconds(0.03f);
}
}
void Update()
{
time += Time.deltaTime;
if (time < 0.03)
{
return;
}
time = 0;
if (index % 79 == 0)
{
index = 0;
}
image.sprite = sprites[index];
index++;
//time += Time.deltaTime;
//if (time < 0.03)
//{
// return;
//}
//time = 0;
//if (index % 79 == 0)
//{
// index = 0;
//}
//image.sprite = sprites[index];
//index++;
}
public override void Close()
{
StopCoroutine(Animation());
base.Close();
}
}
@@ -184,7 +184,7 @@ public class BigMapController : PFUIPanel
}
private void MapManager_OnUpdated()
{
Debug.Log("update "+ mapManager.Zoom);
//Debug.Log("update "+ mapManager.Zoom);
if(mapManager.Zoom <= 4.8)
{
@@ -113,9 +113,11 @@ public class EarthController : PFUIPanel
Country.text = "China";
Province.text = "TaiWan";
ShowSummary(country.latlonCenter);
map.HighlightCountryRegion(173, 1, false, true, Color.white);
}
else {
Country.text = country.name;
Country.text = country.name;
}
};
@@ -129,7 +131,7 @@ public class EarthController : PFUIPanel
}
};
map.OnProvinceEnter += async (int provinceIndex, int regionIndex) =>
map.OnProvinceEnter += (int provinceIndex, int regionIndex) =>
{
var province = map.provinces[provinceIndex];
@@ -151,11 +153,11 @@ public class EarthController : PFUIPanel
EnterBigMap(latLon);
};
skybox = Camera.main.GetComponent<Skybox>();
Debug.Log(skybox != null);
//skybox = Camera.main.GetComponent<Skybox>();
}
private float rot = 0;
Skybox skybox;
//private float rot = 0;
//Skybox skybox;
/// <summary>
/// 显示概要信息
/// </summary>
@@ -209,8 +211,6 @@ public class EarthController : PFUIPanel
/// <param name="latLon"></param>
private void EnterBigMap(Vector2 latLon)
{
Debug.Log("enter big map");
map.FlyToLocation(latLon.x, latLon.y, 1f, 0.1f).Then(() => {
//Close();
@@ -278,7 +278,7 @@ public class EarthController : PFUIPanel
public override void Close()
{
//base.Close();
map.Destroy();
DestroyImmediate(this.gameObject);
}
}