コード例 #1
0
        private async void RadResManual_Click(object sender, EventArgs e)
        {
            cboResVersion.Enabled = true;

            if (cboResVersion.Items.Count > 0)
            {
                return;
            }

            Enabled = false;

            try {
                var resVersions = await Hime.GetAssetVersions();

                foreach (var resVersion in resVersions)
                {
                    cboResVersion.Items.Add(resVersion.Version.ToString());
                }

                if (cboResVersion.Items.Count > 0)
                {
                    cboResVersion.SelectedIndex = 0;
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.ToString(), ApplicationHelper.GetApplicationTitle(), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                radResManual.Enabled = false;
                radResLatest.PerformClick();
            } finally {
                Enabled = true;
            }
        }
コード例 #2
0
        private async Task <DownloadConfig> GetConfig()
        {
            int    resourceVersion;
            string resourceAssetName;

            if (radResLatest.Checked)
            {
                var latest = await Hime.GetLatestVersion();

                resourceVersion   = latest.Res.Version;
                resourceAssetName = latest.Res.IndexName;
            }
            else
            {
                resourceVersion = int.Parse(cboResVersion.Text);
                ResVersion res;

                try {
                    res = await Hime.GetAssetVersion(resourceVersion);
                } catch (HttpRequestException ex) {
                    throw new ApplicationException($"Cannot get manifest of resource version {resourceVersion.ToString()}. Maybe this version does not exist.", ex);
                }

                resourceAssetName = res.IndexName;
            }

            var platform = radPlatformAndroid.Checked ? UnityMobilePlatform.Android : UnityMobilePlatform.iOS;

            return(new DownloadConfig(cboHost.Text, txtAssetVersion.Text, resourceVersion, radResLatest.Checked, platform, resourceAssetName));
        }
コード例 #3
0
 public void heartReset()
 {
     for (int i = 0; i < transform.childCount; i++)
     {
         Hime hime = transform.GetChild(i).GetComponent <Hime>();
         hime.HeartState = HeartType.NONE;
     }
 }
コード例 #4
0
    void Awake()
    {
        // hime init
        for (int i = 0; i < transform.childCount; i++)
        {
            Hime hime = transform.GetChild(i).GetComponent <Hime>();
            hime.Score           = himeInfoPool [i].score;
            hime.BackgroundColor = himeInfoPool [i].backgroundColor;
            hime.init();

            hime.HeartState = HeartType.NONE;
        }
    }