diff --git a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppData.cs b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppData.cs index 682e211..d1261d5 100644 --- a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppData.cs +++ b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppData.cs @@ -21,5 +21,6 @@ namespace UltraCombos.Frozen.RoyalGallery public bool isEnablePaintBG = true; public bool isGetPageBySelf = false; public bool isEnableSceneTester = false; + public int currentIndex = 0; } } diff --git a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppDataxConfiguration.cs b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppDataxConfiguration.cs index deaa5c7..f0d3790 100644 --- a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppDataxConfiguration.cs +++ b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/AppDataxConfiguration.cs @@ -20,6 +20,10 @@ namespace UltraCombos.Frozen.RoyalGallery [Configuration.Config] public bool isEnableSceneTester = false; + [Configuration.Config] + [Range(-1, 15)] + public int targetIndex = -1; + // Start is called before the first frame update void Start() { @@ -27,6 +31,10 @@ namespace UltraCombos.Frozen.RoyalGallery AppData.Instance.isEnablePaintBG = isEnablePaintBG; AppData.Instance.isGetPageBySelf = isGetPageBySelf; AppData.Instance.isEnableSceneTester = isEnableSceneTester; + if (targetIndex >= 0) + { + AppData.Instance.currentIndex = targetIndex; + } } // Update is called once per frame diff --git a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/ResourceClient.cs b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/ResourceClient.cs index c0bbe8f..9b3fe42 100644 --- a/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/ResourceClient.cs +++ b/03_RoyalGallery/Unity-19050-03_RoyalGallery_iPad/19050-03_RoyalGallery_iPad/Assets/RoyalGallery/Script/ResourceClient.cs @@ -10,10 +10,6 @@ namespace UltraCombos.Frozen.RoyalGallery { public class ResourceClient : GrpcClientBase { - public bool isGetPageBySelf = false; - [Configuration.Config] - public int currentIndex = 0; - [Configuration.Config] public string overrideHost = "127.0.0.1"; @@ -95,9 +91,9 @@ namespace UltraCombos.Frozen.RoyalGallery } var data = AppData.Instance; - currentIndex %= pm.names.Count; - string name = pm.names[currentIndex++]; - currentIndex %= pm.names.Count; + data.currentIndex %= pm.names.Count; + string name = pm.names[data.currentIndex++]; + data.currentIndex %= pm.names.Count; data.roleId = name; data.serial = Utils.GenerateSerial(0, data.roleId);