示例#1
0
        public void GenerateMap(Player p, int width, int height, int length)
        {
            Level lvl = CountdownMapGen.Generate(width, height, length);
            Level cur = LevelInfo.FindExact("countdown");

            if (cur != null)
            {
                LevelActions.Replace(cur, lvl);
            }
            else
            {
                LevelInfo.Add(lvl);
            }

            lvl.Save();
            Map = lvl;

            const string format = "Generated map ({0}x{1}x{2}), sending you to it..";

            p.Message(format, width, height, length);
            PlayerActions.ChangeMap(p, "countdown");

            Position pos = Position.FromFeetBlockCoords(8, 23, 17);

            p.SendPos(Entities.SelfID, pos, p.Rot);
        }
示例#2
0
        public void GenerateMap(Player p, int width, int height, int length)
        {
            Level lvl = CountdownMapGen.Generate(width, height, length);
            Level cur = LevelInfo.FindExact("countdown");

            if (cur != null)
            {
                LevelActions.Replace(cur, lvl);
            }
            else
            {
                LevelInfo.Loaded.Add(lvl);
            }

            lvl.Save();
            Map = lvl;

            const string format = "Generated map ({0}x{1}x{2}), sending you to it..";

            Player.Message(p, format, width, height, length);
            PlayerActions.ChangeMap(p, "countdown");

            Position pos = new Position(16 + 8 * 32, 32 + 23 * 32, 16 + 17 * 32);

            p.SendPos(Entities.SelfID, pos, p.Rot);
        }
示例#3
0
        public void GenerateMap(Player p, int width, int height, int length)
        {
            Level lvl = CountdownMapGen.Generate(width, height, length);
            Level cur = LevelInfo.FindExact("countdown");

            if (cur != null)
            {
                LevelActions.Replace(cur, lvl);
            }
            else
            {
                LevelInfo.Add(lvl);
            }

            lvl.Save();
            Map = lvl;

            const string format = "Generated map ({0}x{1}x{2}), sending you to it..";

            p.Message(format, width, height, length);
            PlayerActions.ChangeMap(p, "countdown");
        }