Example #1
0
 public override void UpdateButtons(Form Window)
 {
     if (Buttons.Count() != 0)
     {
         ButtonBack.ChangePosition(new Vector((global.form_menu.Map.Width / 2) - CText.Size.Width / 2 + 9 * BIcon.Width, global.form_menu.Map.Height / 2 - CText.Size.Height / 2 + 8 * BIcon.Height / 3));
         ButtonRetry.ChangePosition(new Vector((global.form_menu.Map.Width / 2) - CText.Size.Width / 2 + 4 * RIcon.Width, global.form_menu.Map.Height / 2 - CText.Size.Height / 2 + 8 * RIcon.Height / 3));
     }
 }
Example #2
0
 public Retry(Player player) : base()
 {
     _player = player;
     _button = new ButtonRetry();
     AddChild(_button);
     _button.x      = (game.width / 2);
     _button.y      = (game.height / 2);
     scoreManager   = new ScoreManager();
     scoreManager.x = _button.x - 100;
     scoreManager.y = _button.y + 100;
     AddChild(scoreManager);
 }
    public void Show(int iRound)
    {
        Panel.gameObject.SetActive(true);

        ButtonNext.SetActive(iRound == 0 ? true : false);
        ButtonRetry.SetActive(iRound == 1 ? true : false);
        ButtonExit.SetActive(iRound == 1 ? true : false);

        int iInfectionCount = RoundManager.Instance.GetInfectedCount();

        if (iInfectionCount == 1)
        {
            TextInfectionCount.text = RoundManager.Instance.GetInfectedCount().ToString() + " person was infected with Ebola!";
        }
        else
        {
            TextInfectionCount.text = RoundManager.Instance.GetInfectedCount().ToString() + " people were infected with Ebola!";
        }
    }
Example #4
0
        public async void ErrorVisible_Changed(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (Animation)
            {
                return;
            }
            if (e.PropertyName == "IsVisible")
            {
                if (ErrorFrame.IsVisible)
                {
                    Animation = true;
                    ErrorFrame.TranslationX  = -300;
                    ButtonRetry.TranslationX = 300;

                    new Thread(async() =>
                    {
                        await ErrorFrame.TranslateTo(ErrorFrame.TranslationX + 320, ErrorFrame.TranslationY, 150);
                        await ErrorFrame.TranslateTo(ErrorFrame.TranslationX - 50, ErrorFrame.TranslationY, 40);
                        await ErrorFrame.TranslateTo(ErrorFrame.TranslationX + 50, ErrorFrame.TranslationY, 50);
                        await ErrorFrame.TranslateTo(ErrorFrame.TranslationX - 20, ErrorFrame.TranslationY, 40);
                    }).Start();

                    new Thread(async() =>
                    {
                        await ButtonRetry.TranslateTo(ButtonRetry.TranslationX - 320, ButtonRetry.TranslationY, 150);
                        await ButtonRetry.TranslateTo(ButtonRetry.TranslationX + 50, ButtonRetry.TranslationY, 40);
                        await ButtonRetry.TranslateTo(ButtonRetry.TranslationX - 50, ButtonRetry.TranslationY, 50);
                        await ButtonRetry.TranslateTo(ButtonRetry.TranslationX + 20, ButtonRetry.TranslationY, 40);
                    }).Start();
                    await Task.Delay(300);

                    Animation = false;
                }
                else
                {
                    ErrorFrame.TranslationX  = -300;
                    ButtonRetry.TranslationX = 300;
                }
            }
        }