public void OnTransmissionPopupClosed()
 {
     if (this.popupView != null)
     {
         this.battleVO.ResetAttackerData();
         this.popupView = null;
         this.incomingTransmissions.Clear();
         this.transmissionIndex = 0;
         Service.Get <HolonetController>().EnableAllHolonetTabButtons();
     }
 }
 public void OnTransmissionPopupIntialized(TransmissionsHolonetPopupView popup)
 {
     Service.Get <HolonetController>().DisableAllHolonetTabButtons();
     this.popupView = popup;
     this.popupView.SetMaxTransmissionIndex(this.incomingTransmissions.Count);
     if (this.HasNewBattles())
     {
         CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>();
         this.battleVO.CharacterID = GameUtils.GetTransmissionHoloId(currentPlayer.Faction, currentPlayer.Planet.Uid);
         this.battleVO.Faction     = currentPlayer.Faction;
     }
     this.popupView.RefreshView(this.incomingTransmissions[this.transmissionIndex]);
 }
Exemplo n.º 3
0
        protected override void OnScreenLoaded()
        {
            this.anims        = new HolonetAnimationController(this);
            this.eventManager = Service.Get <EventManager>();
            this.InitButtons();
            this.tabs = new List <AbstractHolonetTab>();
            this.incomingTransmissionsGroup         = base.GetElement <UXElement>("IncomingTransmissionsGroup");
            this.incomingTransmissionsGroup.Visible = false;
            this.NavTable = base.GetElement <UXTable>("NavTable");
            this.NavTable.SetTemplateItem("NavItem");
            this.commandCenterTab = new CommandCenterHolonetTab(this, HolonetControllerType.CommandCenter);
            this.tabs.Add(this.commandCenterTab);
            if (GameConstants.IsMakerVideoEnabled())
            {
                this.videosTab = new VideosHolonetTab(this, HolonetControllerType.Videos, this.anims);
                this.tabs.Add(this.videosTab);
            }
            else
            {
                this.videosTab = new DeadHolonetTab(this, HolonetControllerType.Videos, "MakerTab");
            }
            this.devNotesTab = new DevNotesHolonetTab(this, HolonetControllerType.DevNotes);
            this.tabs.Add(this.devNotesTab);
            this.transmissionsTab = new TransmissionsHolonetTab(this, HolonetControllerType.Transmissions);
            this.tabs.Add(this.transmissionsTab);
            this.commandCenterTab.SetBadgeCount(this.commandCenterCount);
            if (GameConstants.IsMakerVideoEnabled())
            {
                this.videosTab.SetBadgeCount(this.videosCount);
            }
            this.devNotesTab.SetBadgeCount(this.devNotesCount);
            this.transmissionsTab.SetBadgeCount(this.transmissionsCount);
            Service.Get <EventManager>().RegisterObserver(this, EventId.GameStateChanged, EventPriority.Default);
            HolonetController holonetController = Service.Get <HolonetController>();
            int  inCommingTransmissionCount     = holonetController.TransmissionsController.GetInCommingTransmissionCount();
            bool flag = inCommingTransmissionCount > 0;

            if (!holonetController.CommandCenterController.HasNewPromoEntry() && (flag || holonetController.HasNewBattles()))
            {
                holonetController.SetLastViewed(this.transmissionsTab);
                this.incommingTransmissions = new TransmissionsHolonetPopupView(this);
                this.anims.OpenToIncomingTransmission();
            }
            else
            {
                this.ShowDefaultTabs();
                this.anims.OpenToCommandCenter();
            }
            this.eventManager.SendEvent(EventId.HolonetOpened, null);
            this.allowClose = true;
        }