Exemplo n.º 1
0
        private void AskBarrelRollPosition(object sender, System.EventArgs e)
        {
            BarrelRollPositionDecisionSubPhase selectBarrelRollPosition = (BarrelRollPositionDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                Name,
                typeof(BarrelRollPositionDecisionSubPhase),
                Triggers.FinishTrigger
                );

            selectBarrelRollPosition.AddDecision("Forward", delegate { SetBarrelRollPosition(1.5f); });
            selectBarrelRollPosition.AddDecision("Center", delegate { SetBarrelRollPosition(1); });
            selectBarrelRollPosition.AddDecision("Backwards", delegate { SetBarrelRollPosition(0.5f); });

            selectBarrelRollPosition.InfoText = "Barrel Roll: Select position";

            selectBarrelRollPosition.DefaultDecisionName = "Center";

            selectBarrelRollPosition.RequiredPlayer = Controller.PlayerNo;

            selectBarrelRollPosition.Start();
        }
Exemplo n.º 2
0
        private void StartAskBarrelRollShiftSubphase(object sender, System.EventArgs e)
        {
            BarrelRollPositionDecisionSubPhase selectBarrelRollPosition = (BarrelRollPositionDecisionSubPhase)Phases.StartTemporarySubPhaseNew(
                Name,
                typeof(BarrelRollPositionDecisionSubPhase),
                Triggers.FinishTrigger
                );

            selectBarrelRollPosition.AddDecision("Forward", delegate { SetBarrelRollPosition(Direction.Top); }, isCentered: true);
            selectBarrelRollPosition.AddDecision("Center", delegate { SetBarrelRollPosition(Direction.None); }, isCentered: true);
            selectBarrelRollPosition.AddDecision("Backwards", delegate { SetBarrelRollPosition(Direction.Bottom); }, isCentered: true);

            selectBarrelRollPosition.DescriptionShort = "Barrel Roll: Select position";

            selectBarrelRollPosition.DefaultDecisionName = "Center";

            selectBarrelRollPosition.RequiredPlayer = Controller.PlayerNo;

            selectBarrelRollPosition.ShowSkipButton        = false;
            selectBarrelRollPosition.OnNextButtonIsPressed = DecisionSubPhase.ConfirmDecision;

            selectBarrelRollPosition.Start();
        }