private void HookLobbyStateEvents() { Frame_HostLobby temp = ((LobbyState)GlobalState).LobbyFrame; temp.PlayerNotReady += new EventHandler(PlayerNotReadyHandler); temp.PlayerReady += new EventHandler(PlayerReadyHandler); temp.StartGame += new EventHandler(StartGameHandler); }
private void UnhookLobbyStateEvents() { Frame_HostLobby frame = ((LobbyState)GlobalState).LobbyFrame; frame.PlayerNotReady -= PlayerNotReadyHandler; frame.PlayerReady -= PlayerReadyHandler; frame.StartGame -= StartGameHandler; }
public static Frame_HostLobby BuildHostLobbyFrame(ContentManager Content) { SpriteFont font = Content.Load <SpriteFont>("Kootenay"); Frame_HostLobby fhostlobby = new Frame_HostLobby(800, 500); Sprite_Text start = SpriteBin.The.AddTextSprite(font, "Start Game", "start"); Sprite_Text ready = SpriteBin.The.AddTextSprite(font, "Ready", "ready"); Button eStart = new Button("start", start, 0, 400); ToggleButton eReady = new ToggleButton("ready", ready, 400, 400, Color.White, Color.Green); fhostlobby.addElement(eReady); fhostlobby.addElement(eStart); return(fhostlobby); }
public static Frame_HostLobby BuildHostLobbyFrame(ContentManager Content) { SpriteFont font = Content.Load<SpriteFont>("Kootenay"); Frame_HostLobby fhostlobby = new Frame_HostLobby(800, 500); Sprite_Text start = SpriteBin.The.AddTextSprite(font, "Start Game", "start"); Sprite_Text ready = SpriteBin.The.AddTextSprite(font, "Ready", "ready"); Button eStart = new Button("start", start, 0, 400); ToggleButton eReady = new ToggleButton("ready", ready, 400, 400, Color.White, Color.Green); fhostlobby.addElement(eReady); fhostlobby.addElement(eStart); return fhostlobby; }
public void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content) { _frame = WindowDefinitions.BuildHostLobbyFrame(Content); }