internal void DrawButton(int buttonNumber, Button x) { if (x.active == false) x.buttonImage = songResources.buttons.ElementAt(buttonNumber).texture; else x.buttonImage = songResources.pushedButtons.ElementAt(buttonNumber).texture; x.Draw(songResources.spriteBatch); }
internal void AddButton(buttonEnum type, float x) { Button tempButton = new Button() { active = false, Type = type, timeSpawn = MediaPlayer.PlayPosition.Seconds * 1000 + MediaPlayer.PlayPosition.Milliseconds, buttonPosition = new Vector2(x, 40) }; GameButtons.Add(tempButton); ButtonInEditor.Add(tempButton); }
private void setTimer(Button x) { x.active = true; MyTimer t = new MyTimer(150); t.Tag = x; t.Elapsed += t_Elapsed; t.Start(); }