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); }
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); }
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(); } }
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); }