Exemplo n.º 1
0
        void ClickedWarp(object ctx)
        {
            PlayerRespawner activeInstance = PlayerRespawner.GetActiveInstance();

            if (activeInstance != null)
            {
                base.Owner.Hide();
                activeInstance.ForceRespawn();
            }
        }
Exemplo n.º 2
0
        protected override bool DoShow(MenuScreen <PauseMenu> previous)
        {
            GuiContentData guiContentData = new GuiContentData();

            guiContentData.SetValue("showMap", base.Owner._mapWindow.CanShow(base.Owner.currEnt));
            bool flag = !PlayerRespawner.RespawnInhibited() && PlayerRespawner.GetActiveInstance() != null;

            guiContentData.SetValue("canWarp", flag);
            if (flag)
            {
                IDataSaver saver = base.Owner._saver.GetSaver("/local/start", true);
                if (saver != null)
                {
                    guiContentData.SetValue("hasWarpTgt", true);
                    guiContentData.SetValue("warpTgt", saver.LoadData("level"));
                }
                else
                {
                    guiContentData.SetValue("hasWarpTgt", false);
                }
            }
            base.Root.ApplyContent(guiContentData, true);
            return(true);
        }