Пример #1
0
 public MainScreen(Game game)
     : base(game)
 {
     playBtn = new Button(game, new Rectangle(), Textures.playButton);
     ScreenManager screenManager = game.Services.GetService<ScreenManager>();
     playBtn.onMouseUp += (Object Sender, EventArgs e) =>
     {
         this.hidden = true;
         screenManager.AddScreen(new GameplayScreen(game));
     };
 }
Пример #2
0
 public Message(Game game, string text, EventHandler onOk, Vector2 position, Texture2D background)
     : base(game)
 {
     this.text = text;
     this.position = position;
     this.background = background;
     this.okButton = new Button(game, new Rectangle(), Textures.okButton);
     if (onOk != null)
         this.okButton.onMouseUp += onOk;
 }