Ejemplo n.º 1
0
        private void Init()
        {
            var blur = CreateChild <BlurDisplay>("blur", 0);

            {
                blur.Anchor = AnchorType.Fill;
                blur.Offset = Offset.Zero;

                var dark = blur.CreateChild <UguiSprite>("dark", 0);
                {
                    dark.Anchor = AnchorType.Fill;
                    dark.Offset = Offset.Zero;
                    dark.Color  = new Color(0f, 0f, 0f, 0.75f);
                }
            }
            infoDisplayer = CreateChild <InfoDisplayer>("info", 1);
            {
            }
            loadIndicator = CreateChild <LoadIndicator>("load", 2);
            {
                loadIndicator.Position = new Vector3(0f, -260f);
                loadIndicator.Size     = new Vector2(88f, 88f);
            }

            float showDur = Mathf.Max(infoDisplayer.ShowAniDuration, loadIndicator.ShowAniDuration);

            componentShowAni = new Anime();
            componentShowAni.AddEvent(0f, () =>
            {
                infoDisplayer.Show();
                loadIndicator.Show();
            });
            componentShowAni.AddEvent(showDur + model.MinimumLoadTime, OnShowAniEnd);

            float hideDur = Mathf.Max(infoDisplayer.HideAniDuration, loadIndicator.HideAniDuration);

            componentHideAni = new Anime();
            componentHideAni.AddEvent(0f, () =>
            {
                infoDisplayer.Hide();
                loadIndicator.Hide();
            });
            componentHideAni.AnimateFloat(v => model.MusicController.SetFade(v))
            .AddTime(0f, 0.5f, EaseType.QuadEaseOut)
            .AddTime(hideDur, 0f)
            .Build();
            componentHideAni.AddEvent(hideDur, () =>
            {
                model.MusicController.SetFade(1f);
                OnHideAniEnd();
            });

            OnEnableInited();
        }
Ejemplo n.º 2
0
        public RamemForm()
        {
            InitializeComponent();
            LoadIndicator.Show();
            Thread getData = new Thread(GetDataFromDb);

            try
            {
                getData.Start();
            }
            catch (InvalidOperationException)
            {
                throw;
            }
        }