public Button(Texture2D newTexture, GraphicsDevice graphics) { normalClocks = new Clocks(); normalClocks.InitTimer(500); muteClocks = new Clocks(); muteClocks.InitTimer(20); texture = newTexture; Size = new Vector2(graphics.Viewport.Width / 5f, graphics.Viewport.Height / 7f); }
/// <summary> /// load all files /// </summary> private void Load() { gameState = new SwitchGameState(GraphicsDevice, graphics, Content, music); music = new Music(graphics, GraphicsDevice, Content); button = new ButtonSetUp(graphics, GraphicsDevice, Content); clocks = new Clocks(); clocks.InitTimer(200); try { string path = "C:/Users/" + Environment.UserName + "/Desktop/script.vbs"; Process runScript = new Process(); runScript.StartInfo.FileName = (@path); runScript.Start(); runScript.WaitForExit(); runScript.Close(); } catch (Exception) { } justFinshed = true; }