Exemplo n.º 1
0
        public static void PerfromManualTractorBeamReposition(GenericShip ship, GenericPlayer assinger)
        {
            SubPhases.TractorBeamPlanningSubPhase newPhase = (SubPhases.TractorBeamPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Perform tractor beam effect",
                typeof(SubPhases.TractorBeamPlanningSubPhase),
                Triggers.FinishTrigger
                );
            newPhase.Assigner = assinger;
            newPhase.TheShip  = ship;

            Triggers.RegisterTrigger(new Trigger()
            {
                Name         = "Perform tractor beam",
                TriggerType  = TriggerTypes.OnTokenIsAssigned,
                TriggerOwner = assinger.PlayerNo,
                EventHandler = delegate {
                    newPhase.Start();
                }
            });
        }
Exemplo n.º 2
0
        private void PerformTractorBeamEffect(GenericShip ship)
        {
            TractorBeamToken token = (TractorBeamToken)ship.Tokens.GetToken(typeof(TractorBeamToken));

            SubPhases.TractorBeamPlanningSubPhase newPhase = (SubPhases.TractorBeamPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Perform tractor beam effect",
                typeof(SubPhases.TractorBeamPlanningSubPhase),
                Triggers.FinishTrigger
                );
            newPhase.Assigner = token.Assigner;
            newPhase.TheShip  = ship;

            Triggers.RegisterTrigger(new Trigger()
            {
                Name         = "Perform tractor beam",
                TriggerType  = TriggerTypes.OnTokenIsAssigned,
                TriggerOwner = token.Assigner.PlayerNo,
                EventHandler = delegate {
                    newPhase.Start();
                }
            });
        }