|
|
|
@ -49,14 +49,12 @@ namespace UltraCombos.Frozen.RoyalGallery |
|
|
|
public void GetPage() |
|
|
|
public void GetPage() |
|
|
|
{ |
|
|
|
{ |
|
|
|
var data = AppData.Instance; |
|
|
|
var data = AppData.Instance; |
|
|
|
data.Trace("ResourceClient::GetPage()"); |
|
|
|
|
|
|
|
Debug.Log($"data.isGetPageBySelf1 = {data.isGetPageBySelf}"); |
|
|
|
|
|
|
|
if (data.isGetPageBySelf) |
|
|
|
if (data.isGetPageBySelf) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GetPageBySelf(); |
|
|
|
GetPageBySelf(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
Debug.Log($"data.isGetPageBySelf2 = {data.isGetPageBySelf}"); |
|
|
|
|
|
|
|
if (/*State != ChannelState.Ready ||*/ is_index_got) |
|
|
|
if (/*State != ChannelState.Ready ||*/ is_index_got) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
@ -65,7 +63,6 @@ namespace UltraCombos.Frozen.RoyalGallery |
|
|
|
|
|
|
|
|
|
|
|
private async void GetPageAsync() |
|
|
|
private async void GetPageAsync() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Debug.Log("GetPageAsync()"); |
|
|
|
|
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
var data = AppData.Instance; |
|
|
|
var data = AppData.Instance; |
|
|
|
@ -88,28 +85,21 @@ namespace UltraCombos.Frozen.RoyalGallery |
|
|
|
|
|
|
|
|
|
|
|
private void GetPageBySelf() |
|
|
|
private void GetPageBySelf() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Debug.Log("GetPageBySelf()"); |
|
|
|
|
|
|
|
PageManager pm = FindObjectOfType<PageManager>(); |
|
|
|
PageManager pm = FindObjectOfType<PageManager>(); |
|
|
|
if (!pm) |
|
|
|
if (!pm) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pm.Trace(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = AppData.Instance; |
|
|
|
var data = AppData.Instance; |
|
|
|
data.currentIndex %= pm.names.Count; |
|
|
|
data.currentIndex %= pm.names.Count; |
|
|
|
string name = pm.names[data.currentIndex++]; |
|
|
|
string name = pm.names[data.currentIndex++]; |
|
|
|
data.currentIndex %= pm.names.Count; |
|
|
|
data.currentIndex %= pm.names.Count; |
|
|
|
|
|
|
|
|
|
|
|
Debug.Log($"GetPageBySelf() name = {name}"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.roleId = name; |
|
|
|
data.roleId = name; |
|
|
|
data.serial = Utils.GenerateSerial(0, data.roleId); |
|
|
|
data.serial = Utils.GenerateSerial(0, data.roleId); |
|
|
|
data.color = new Color32(237, 244, 242, 255); |
|
|
|
data.color = new Color32(237, 244, 242, 255); |
|
|
|
|
|
|
|
|
|
|
|
Debug.Log($"GetPageBySelf() data.roleId = {data.roleId}"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onPageReceived.Invoke(data.roleId); |
|
|
|
onPageReceived.Invoke(data.roleId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|