protected virtual void GameModeCancelBoost() { //GameMode.CurrentGameMode.CancelBoost(BarrelRollProblems); if (HostAction == null) { HostAction = new BoostAction() { HostShip = TheShip } } ; Rules.Actions.ActionIsFailed(TheShip, HostAction, BarrelRollProblems); }
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(); }
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(); }
void OnBoostEnded(Event_BoostEnded e) { _activeBoost = null; _owner.UpdateBoostButtonsAvailability(); }