Пример #1
0
        private void ShowSecond()
        {
            First.IsVisible = false;
            if (!string.IsNullOrEmpty(_achivementCode))
            {
                StartPrayText.Text = "実績解禁!!";
            }
            StartPray.IsVisible = true;
            Sound.Pray();
            Sound.PrayVoice();
            MagicCircle.Show(this, 3000, () =>
            {
                StartPray.IsVisible = false;
                Flash.Show(this, 1000, () =>
                {
                    Second.IsVisible = true;
                    var masters      = CodeMasterServce.GetMasters <JobMaster>();
                    var target1      = string.IsNullOrEmpty(_achivementCode) ? CodeMasterServce.GetNameRandom() : CodeMasterServce.GetNameRandomByAttribute(_achivementCode);
                    var target2      = masters[MyRandom.GetRandom(masters.Count)];
                    var gotName      = new Name(target1, target2);

                    var name               = new Chu2Name();
                    name.BindingContext    = gotName;
                    name.ShowAttribute     = true;
                    name.ShowAttributeType = true;
                    name.ShowParameter     = true;
                    GetResult.Children.Add(name);

                    var image               = new Charactor();
                    image.BindingContext    = gotName;
                    image.HorizontalOptions = LayoutOptions.End;
                    Second.Children.Insert(0, image);

                    _current.CountUpPray();

                    var hasName = _current.Names.FirstOrDefault(n => n.Attribute == gotName.Attribute);

                    if (hasName != null)
                    {
                        BackButton.IsVisible = false;
                        Device.StartTimer(TimeSpan.FromSeconds(3), () =>
                        {
                            SelectItem.Show(this, "同じ属性の二つ名を既に持っています。二つ名を入れ替えますか?",
                                            new List <SelectItem.Item>()
                            {
                                new SelectItem.Item()
                                {
                                    Label    = "二つ名を入れ替える",
                                    Selected = () => {
                                        _current.Names.Remove(hasName);
                                        AddNewName(gotName);
                                        Device.StartTimer(TimeSpan.FromSeconds(2), () => { Back(); return(false); });
                                    }
                                },
                                new SelectItem.Item()
                                {
                                    Label    = "キャンセル",
                                    Selected = () => {
                                        CutIn.Show(this, "二つ名の取得をキャンセルしました", 3, () => { Back(); });
                                    }
                                }
                            });
                            return(false);
                        });
                    }
                    else
                    {
                        AddNewName(gotName);
                    }
                });
            });
        }
Пример #2
0
 private void FinishBattleWin(Name selectedName)
 {
     Enemy.RobName(selectedName);
     Current.AddNewName(selectedName);
     CutIn.Show(this, NameList.SelectedName.Chu2Name + NameList.SelectedName.Job + "を手に入れました", 3, () => { Back(); });
 }