コード例 #1
0
 public ZoneMediator(EventDispatcher eventDispatcher, DailyChallengeService dailyChallengeService, ContentSchedulerService contentSchedulerService, PartyGameManager partyGameManager)
 {
     this.dailyChallengeService   = dailyChallengeService;
     this.partyGameManager        = partyGameManager;
     this.contentSchedulerService = contentSchedulerService;
     eventDispatcher.AddListener <ZoneTransitionEvents.ZoneTransition>(onZoneTransition);
     eventDispatcher.AddListener <WorldServiceEvents.ContentDateChanged>(onContentDateChanged);
 }
コード例 #2
0
 public new void Start()
 {
     base.Start();
     claimableRewardDefinition = Service.Get <GameData>().Get <Dictionary <int, ClaimableRewardDefinition> >();
     dataEntityCollection      = Service.Get <CPDataEntityCollection>();
     contentSchedulerService   = Service.Get <ContentSchedulerService>();
     Service.Get <EventDispatcher>().AddListener <RewardServiceEvents.ClaimedReward>(onClaimedReward);
     Service.Get <EventDispatcher>().AddListener <RewardServiceEvents.ClaimableRewardFail>(onClaimableRewardFail);
 }
コード例 #3
0
        public override IEnumerator PerformFirstPass()
        {
            string dailyChallengesScheduleManifestPath           = DailyChallengeService.GetDateManifestMapPath();
            AssetRequest <DatedManifestMap> scheduleAssetRequest = Content.LoadAsync <DatedManifestMap>(dailyChallengesScheduleManifestPath);

            yield return(scheduleAssetRequest);

            Dictionary <int, ScheduledEventDateDefinition> events = Service.Get <IGameData>().Get <Dictionary <int, ScheduledEventDateDefinition> >();
            ScheduledEventDateDefinition def = null;

            events.TryGetValue(SupportWindow.Id, out def);
            ContentSchedulerService service = new ContentSchedulerService(scheduleAssetRequest.Asset.Map.Keys, PenguinStandardTimeOffsetHours, def);

            Service.Set(service);
            bool   offlineMode  = service.HasSupportEndded();
            string offline_mode = CommandLineArgs.GetValueForKey("offline_mode");

            if (!string.IsNullOrEmpty(offline_mode))
            {
                offlineMode = offline_mode.ToLower().Trim() == "true";
            }
            Service.Get <GameSettings>().SetOfflineMode(offlineMode);
        }
コード例 #4
0
 public new void Start()
 {
     base.Start();
     contentSchedulerService = Service.Get <ContentSchedulerService>();
     gameStateController     = Service.Get <GameStateController>();
 }