Ejemplo n.º 1
0
        private async void Health3(Anim.Speed Speed)
        {
            if (hp3.BackColor == Color.FromArgb(22, 22, 25))   //black
            {
                hp3.BackColor = Color.FromArgb(255, 128, 128); //red
            }
            if (hp3.BackColor == Color.FromArgb(255, 128, 128))
            {
                _3H = false;
                await Anim.ChangeColorAsync(hp3, 22, 22, 25, Speed);

                _3H = true;
            }
        }
Ejemplo n.º 2
0
        private async void StartGame()
        {
            r       = new Random();
            matches = new List <string>();
            RandomSequence.Mix();
            flag      = true;
            IsEndGame = false;
            IsAnimEnd = false;
            RandomColor.Mix();
            Clock.Stop();
            lbCLOCK.Text = String.Empty;

            for (int i = 0; i < 4; i++)
            {
                matches.Add(ActivityPanels[RandomSequence[i]].Name);
                if (IsColored)
                {
                    await Anim.ChangeColorAsync(ActivityPanels[RandomSequence[i]], colors[RandomColor[i], 0], colors[RandomColor[i], 1], colors[RandomColor[i], 2], Complexity(counterLVL));
                }
                else
                {
                    await Anim.ChangeColorAsync(ActivityPanels[RandomSequence[i]], FlickColor.R, FlickColor.G, FlickColor.B, Complexity(counterLVL));
                }
                await Anim.ChangeColorAsync(ActivityPanels[RandomSequence[i]], StartColor.R, StartColor.G, StartColor.B, Complexity(counterLVL));
            }

            foreach (var Health in HealthList)
            {
                Health.Visible = true;
            }

            IsStarted = true;
            IsBreak   = false;
            Clock.Start(lbCLOCK);

            Anim.ChangeColor(lbTEXT, 255, 128, 128, Anim.Speed._5);
            Anim.ChangeText(lbTEXT, "HEALTH", Anim.Speed._15);

            if (!IsFirstHealth)
            {
                HealthAnimation();
                IsFirstHealth = true;
            }
            IsAnimEnd = true;
        }