Esempio n. 1
0
 public Button(Modegame mg, Vector2 v, SpriteFont font, string name, ButtonAction ba)
 {
     this.mg   = mg;
     this.v    = v;
     this.font = font;
     this.name = name;
     this.ba   = ba;
 }
Esempio n. 2
0
 public Button(Modegame mg, Vector2 v, SpriteFont font, string name, ButtonAction ba, bool on, Color ButtonColorOn, Color ButtonColorOff)
 {
     this.mg             = mg;
     this.v              = v;
     this.font           = font;
     this.name           = name;
     this.ba             = ba;
     this.on             = on;
     this.ButtonColorOff = ButtonColorOff;
     this.ButtonColorOn  = ButtonColorOn;
 }
Esempio n. 3
0
 void ChangeModeGame(Modegame n)
 {
     if (n == Modegame.menu)
     {
         menuitemselected = 1;
     }
     if ((n == Modegame.death) && (modegame == Modegame.game))//modegame
     {
         if (table.Count != 0)
         {
             if (table.Count < tablecounts)
             {
                 table.Add(new Table(username, score, currentnumberlevel, DateTime.Now.ToString("dd.MM.yyyy")));
                 for (int i = 0; i < table.Count - 1; i++)
                 {
                     if (table[i].score < table[table.Count - 1].score)
                     {
                         ChangeTableItem(i, table.Count - 1);
                     }
                 }
                 SaveData();
             }
             else if (table[table.Count - 1].score < score)
             {
                 table[table.Count - 1] = new Table(username, score, currentnumberlevel, DateTime.Now.ToString("dd.MM.yyyy"));
                 for (int i = 0; i < table.Count - 1; i++)
                 {
                     if (table[i].score < table[table.Count - 1].score)
                     {
                         ChangeTableItem(i, table.Count - 1);
                     }
                 }
                 SaveData();
             }
         }
         else
         {
             table.Add(new Table(username, score, currentnumberlevel, DateTime.Now.ToString("dd.MM.yyyy")));
         }
     }
     if ((n == Modegame.game) && (modegame == Modegame.menu))
     {
         CreateLevel(1);
     }
     if ((n == Modegame.results) && (modegame == 0))
     {
         //
     }
     if ((n == Modegame.death) && (modegame == Modegame.game))
     {
         steptime = timefrogdeath;
     }
     if (n == Modegame.winlevel)
     {
         currentnumberlevel++;
         steptime = timefrogwinlevel;
     }
     if ((n == Modegame.game) && (modegame == Modegame.winlevel))
     {
         CreateLevel(currentnumberlevel);
     }
     modegame        = n;
     timeactionpause = maxtimeactionpause;
 }