示例#1
0
 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);
 }
示例#2
0
 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);
 }
示例#3
0
 private void setTimer(Button x)
 {
     x.active = true;
     MyTimer t = new MyTimer(150);
     t.Tag = x;
     t.Elapsed += t_Elapsed;
     t.Start();
 }