コード例 #1
0
        private void OnRelocateClicked(UXButton button)
        {
            PlanetVO vO = this.currentPlanet.VO;

            Service.Get <EventManager>().SendEvent(EventId.LootTableRelocateTapped, vO.Uid);
            ConfirmRelocateScreen.ShowModal(vO, null, null);
        }
コード例 #2
0
        public static void ShowModal(PlanetVO planetVO, OnScreenModalResult onModalResult, object modalResultCookie)
        {
            CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>();
            bool          flag          = Service.Get <BuildingLookupController>().HasNavigationCenter();

            if (planetVO == null || !planetVO.PlayerFacing || planetVO == currentPlayer.Planet || !currentPlayer.IsPlanetUnlocked(planetVO.Uid) || !flag)
            {
                return;
            }
            string text   = currentPlayer.IsRelocationRequirementMet().ToString();
            string cookie = string.Concat(new object[]
            {
                currentPlayer.GetRawRelocationStarsCount(),
                "|",
                text,
                "|",
                planetVO.PlanetBIName,
                "|",
                currentPlayer.Planet.PlanetBIName
            });

            Service.Get <EventManager>().SendEvent(EventId.PlanetRelocateButtonPressed, cookie);
            ConfirmRelocateScreen confirmRelocateScreen = new ConfirmRelocateScreen(planetVO);

            confirmRelocateScreen.OnModalResult     = onModalResult;
            confirmRelocateScreen.ModalResultCookie = modalResultCookie;
            confirmRelocateScreen.IsAlwaysOnTop     = true;
            Service.Get <ScreenController>().AddScreen(confirmRelocateScreen);
        }
コード例 #3
0
 public unsafe static long $Invoke13(long instance, long *args)
 {
     ConfirmRelocateScreen.ShowModal((PlanetVO)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2]));
     return(-1L);
 }
コード例 #4
0
 protected override void RefreshScreen()
 {
     ConfirmRelocateScreen.ShowModal(this.planetVO, base.OnModalResult, base.ModalResultCookie);
     base.Close(null);
 }