public ConsolePlayer(Server server) : base() { this.Group = new ConsoleGroup(); username = "******"; ip = "127.0.0.1"; }
public Server() { Log("Starting Server"); s = this; consolePlayer = new ConsolePlayer(s); consolePlayer.SetUsername(ConsoleName); //Group.DefaultGroup = new DefaultGroup(); //debugging mainlevel = new World(0, 127, 0, "main", new Random().Next()); World.worlds.Add(mainlevel); ml = new MainLoop("server"); #region updatetimer ml.Queue(delegate { updateTimer.Elapsed += delegate { Player.GlobalUpdate(); }; updateTimer.Start(); }); #endregion //TODO AI Update Timer //Setup(); Log("Server Started"); //new Creeper(new Point3(0, 0, 0), mainlevel); }
public ConsolePlayer(Server server) : base() { this.group = new ConsoleGroup(); username = Server.ConsoleName; ip = "127.0.0.1"; }
public RemotePlayer(Server server) : base() { this.group = new ConsoleGroup(); username = Remote.getUsername(); ip = Remote.getIp(); }
public Server() { Log("Starting Server"); s = this; if (Directory.Exists("main")) { mainlevel = World.LoadLVL("main"); } else { mainlevel = new World(0, 127, 0, "main", 0) { ChunkLimit = int.MaxValue }; World.worlds.Add(mainlevel); } //changed to seed 0 for now ml = new MainLoop("server"); #region updatetimer ml.Queue(delegate { keepAliveTimer.Elapsed += delegate { Player.players.ForEach(delegate(Player p) { p.SendKeepAlive(); }); }; keepAliveTimer.Start(); }); ml.Queue(delegate { updateTimer.Elapsed += delegate { Player.GlobalUpdate(); }; updateTimer.Start(); }); ml.Queue(delegate { playerlisttimer.Elapsed += delegate { Player.PlayerlistUpdate(); }; playerlisttimer.Start(); }); #endregion //TODO AI Update Timer //Setup(); //new Creeper(new Point3(0, 72, 0), mainlevel); }
public Server() { Log("Starting Server"); s = this; mainlevel = new World(0, 127, 0, "main"); World.worlds.Add(mainlevel); ml = new MainLoop("server"); #region updatetimer ml.Queue(delegate { updateTimer.Elapsed += delegate { Player.GlobalUpdate(); }; updateTimer.Start(); }); #endregion Setup(); Log("Server Started"); }
private static void Exit() { Server.Stop(); Server = null; }
private static void StartServer() { (Server = new Server()).Setup(); (webServer = new WebServer()).Start(); }
public Server() { s = this; }