예제 #1
0
        public override bool IsValid(IBosServiceCollection context)
        {
            var boostState = context.GetService <IX20BoostService>().State;

            return(context.TutorialService.IsStateCompleted(TutorialStateName.BuyBus) &&
                   (boostState == BoostState.Active || boostState == BoostState.ReadyToActivate));
        }
예제 #2
0
 public PlanetInfo(int id, IBosServiceCollection services)
 {
     this.Id            = id;
     this.services      = services;
     this.planetService = services.GetService <IPlanetService>();
     UpdateData();
 }
예제 #3
0
        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());
        }
예제 #4
0
 private void ApplySpecialOffer(StoreProductData product)
 {
     services.GetService <ISpecialOfferService>().OnOfferPurchased();
 }
예제 #5
0
 public void UpdateData()
 => this.Data = services.GetService <IResourceService>().Planets.GetPlanet(Id);