Exemplo n.º 1
0
        private static void AskWayToDropBomb()
        {
            WayToDropDecisionSubPhase selectBombToDrop = (WayToDropDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                "Select way to drop bomb",
                typeof(WayToDropDecisionSubPhase),
                Triggers.FinishTrigger
                );

            selectBombToDrop.AddDecision("Drop", DropBomb);
            selectBombToDrop.AddDecision("Launch", LaunchBomb);

            selectBombToDrop.InfoText = "Select way to drop the bomb";

            selectBombToDrop.DefaultDecisionName = "Drop";

            selectBombToDrop.RequiredPlayer = Selection.ThisShip.Owner.PlayerNo;

            selectBombToDrop.Start();
        }
Exemplo n.º 2
0
        private static void AskWayToDropDevice()
        {
            WayToDropDecisionSubPhase subphase = (WayToDropDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                "Select the direction to drop the bomb",
                typeof(WayToDropDecisionSubPhase),
                Triggers.FinishTrigger
                );

            if (Selection.ThisShip.GetAvailableBombDropTemplates(CurrentDevice).Count != 0)
            {
                subphase.AddDecision("Drop", (o, e) => { DecisionSubPhase.ConfirmDecisionNoCallback(); DropDevice(); });
            }
            subphase.AddDecision("Launch", LaunchBomb);

            subphase.DescriptionShort    = "Select a way how to use the device";
            subphase.DefaultDecisionName = "Drop";
            subphase.RequiredPlayer      = Selection.ThisShip.Owner.PlayerNo;

            subphase.Start();
        }