public override bool IsValid(IBosServiceCollection context) { var boostState = context.GetService <IX20BoostService>().State; return(context.TutorialService.IsStateCompleted(TutorialStateName.BuyBus) && (boostState == BoostState.Active || boostState == BoostState.ReadyToActivate)); }
public PlanetInfo(int id, IBosServiceCollection services) { this.Id = id; this.services = services; this.planetService = services.GetService <IPlanetService>(); UpdateData(); }
public override string GetValidationDescription(IBosServiceCollection services) { var sb = GetBaseValidationDescription(); var boostState = services.GetService <IX20BoostService>().State; sb.AppendTutorialStateCompletedCondition(TutorialStateName.BuyBus); sb.AppendLine($"x20 boost is Active or ReadyToActivate: { boostState == BoostState.Active || boostState == BoostState.ReadyToActivate}"); return(sb.ToString()); }
private void ApplySpecialOffer(StoreProductData product) { services.GetService <ISpecialOfferService>().OnOfferPurchased(); }
public void UpdateData() => this.Data = services.GetService <IResourceService>().Planets.GetPlanet(Id);