示例#1
0
        public override bool DoEquip(Hero hero)
        {
            var wndOptions = new WndOptions(TXT_MISSILES, TXT_R_U_SURE, TXT_YES, TXT_NO);

            wndOptions.SelectAction = (index) =>
            {
                if (index == 0)
                {
                    base.DoEquip(hero);
                }
            };

            GameScene.Show(wndOptions);

            return(false);
        }
示例#2
0
        public static void HeroJump(Hero hero)
        {
            var wnd = new WndOptions(TXT_CHASM, TXT_JUMP, TXT_YES, TXT_NO);

            wnd.SelectAction = (index) =>
            {
                if (index != 0)
                {
                    return;
                }

                JumpConfirmed = true;
                hero.Resume();
            };

            GameScene.Show(wnd);
        }
示例#3
0
 private void NewGameClick(Button obj)
 {
     if (GamesInProgress.Check(curClass) != null)
     {
         var progressWnd = new WndOptions(TXT_REALLY, TXT_WARNING, TXT_YES, TXT_NO);
         progressWnd.SelectAction = (index) =>
         {
             if (index == 0)
             {
                 StartNewGame();
             }
         };
         Add(progressWnd);
     }
     else
     {
         StartNewGame();
     }
 }
示例#4
0
        public void ConfirmCancelation()
        {
            var wndOptions = new WndOptions(Name, TxtWarning, TxtYes, TxtNo);

            wndOptions.SelectAction = index =>
            {
                switch (index)
                {
                case 0:
                    CurUser.SpendAndNext(TimeToRead);
                    IdentifiedByUse = false;
                    break;

                case 1:
                    GameScene.SelectItem(ItemSelector, Mode, InventoryTitle);
                    break;
                }
            };
            GameScene.Show(wndOptions);
        }