public override void Update(GameTime gameTime) { sender.UpdateCurrentState(); sender.SendToAll(); base.Update(gameTime); }
protected override void AfterManagerPreStageUpdate(GameTime time) { if (reciever != null) { reciever.Recieve(); reciever.Send(); } else if (sender != null) { if (startDebug == true) { new Vector2(); } sender.UpdateCurrentState(); sender.SendToAll(); } else { if (Input.KeyDown(Keys.F1)) { sender = new NetManagerSender(25565); stage.CreateActor(0).AddComponent <ServerConnectionComponent>().Set(playerSpawns, "Unknown", stage); } else if (Input.KeyDown(Keys.F2)) { reciever = new NetManagerReciever(new IPEndPoint(IPAddress.Parse("0:0:0:0:0:0:0:1"), 25565), "Unknown"); stage.CreateActor(0).AddComponent <ClientConnectionComponent>(); } } if (Input.KeyDown(Keys.F5)) { startDebug = true; } }