예제 #1
0
        protected virtual void GameModeCancelBoost()
        {
            //GameMode.CurrentGameMode.CancelBoost(BarrelRollProblems);

            if (HostAction == null)
            {
                HostAction = new BoostAction()
                {
                    HostShip = TheShip
                }
            }
            ;
            Rules.Actions.ActionIsFailed(TheShip, HostAction, BarrelRollProblems);
        }
예제 #2
0
    void OnBoostButtonPush(Event_TryActivateBoost e)
    {
        if (!CanActivateBoost(e.Type))
        {
            return;
        }
        var price = GetBoostPrice(e.Type);

        if (_owner.Score >= price)
        {
            _owner.SpendScore(price);
            _activeBoost = GetAction(e.Type);
        }
        _owner.UpdateBoostButtonsAvailability();
    }
예제 #3
0
        private void PerfromStraightTemplatePlanning()
        {
            BoostAction stubAction = new BoostAction()
            {
                HostShip = TheShip
            };

            BoostPlanningSubPhase boostPlanning = (BoostPlanningSubPhase)Phases.StartTemporarySubPhaseNew(
                "Boost",
                typeof(BoostPlanningSubPhase),
                delegate {
                FinishTractorBeamMovement(stubAction);
            }
                );

            boostPlanning.HostAction = stubAction;
            InitializeBostPlanning(boostPlanning);
            Phases.UpdateHelpInfo();
            boostPlanning.TryPerformBoost();
        }
예제 #4
0
 void OnBoostEnded(Event_BoostEnded e)
 {
     _activeBoost = null;
     _owner.UpdateBoostButtonsAvailability();
 }