Exemple #1
0
 public Button(Texture2D image, GameState gameState, string ksduhg, ParallaxManager pm)
 {
     this.pm        = pm;
     this.state     = gameState;
     this.transform = this.AddComponent <Transform>();
     this.mouse     = this.AddComponent <MouseMenueInteractive>();
     this.mouse.SetSize(image.Width, image.Height);
     this.mouse.OnClick += OnClick;
     this.mouse.start();
 }
Exemple #2
0
 public Button(Texture2D image, GameState gameState)
 {
     this.scale     = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width / 1920.0f;
     this.image     = image;
     this.state     = gameState;
     this.transform = this.AddComponent <Transform>();
     this.mouse     = this.AddComponent <MouseMenueInteractive>();
     this.mouse.SetSize(image.Width, image.Height);
     this.mouse.OnClick += OnClick;
     this.mouse.start();
     EventManager.OnRender += Render;
 }