Exemplo n.º 1
0
 private void GokuStuff(Ch2Goku goku2, Goku goku, SenzuBeans senzuBean, Redbull redBull )
 {
     ScoreTimer+=2;
     if (ScoreTimer == 60)
     {
         goku.score++;
         ScoreTimer = 0;
     }
     goku2.Movement(ref redBull.XBoost);
     int OnScreen = senzuBean.SenzuBeanRect.Count;
     goku2.CaptureSenzuBean(ref senzuBean.SenzuBeanRect, out senzuBean.SenzuBeanRect, out senzuBean.RectsOnScreen);
     if (OnScreen != senzuBean.SenzuBeanRect.Count)
         goku.score += goku.level;
     bar.HealthANDExpBar(ref goku2.level, ref goku2.health, ref goku2.EXP);
     if (goku2.health <= 0)
     {
         Dead = true;
         if (goku2.level != 0)
             goku.score = goku.score * goku.level;
         string highScore = System.IO.File.ReadAllText(@"Content\Text.txt");
         goku.HighScore = int.Parse(highScore);
         if (goku.score > goku.HighScore)
         {
             System.IO.File.WriteAllText(@"Content\Text.txt", goku.score.ToString());
             goku.HighScore = goku.score;
         }
     }
 }
Exemplo n.º 2
0
 private void GokuStuff(Ch2Goku goku2, Goku goku, SenzuBeans senzuBean, Redbull redBull)
 {
     ScoreTimer += 2;
     if (ScoreTimer == 60)
     {
         goku.score++;
         ScoreTimer = 0;
     }
     goku2.Movement(ref redBull.XBoost);
     int OnScreen = senzuBean.SenzuBeanRect.Count;
     goku2.CaptureSenzuBean(ref senzuBean.SenzuBeanRect, out senzuBean.SenzuBeanRect, out senzuBean.RectsOnScreen);
     if (OnScreen != senzuBean.SenzuBeanRect.Count)
         goku.score += goku.level;
     bar.HealthANDExpBar(ref goku2.level, ref goku2.health, ref goku2.EXP);
 }
Exemplo n.º 3
0
 private void GokuStuff(Ch2Goku goku2, Goku goku, Ch2Goku goku3, SenzuBeans senzuBean, Redbull redBull)
 {
     ScoreTimer +=2;
     if (ScoreTimer == 60)
     {
         goku.score+=4;
         ScoreTimer = 0;
     }
     if (ToonChoice == 0)
     {
         goku2.Movement(ref redBull.XBoost);
     }
     if (ToonChoice == 1)
     {
         goku3.Ch4Movement(ref redBull.XBoost, ref goku2.level);
     }
     int OnScreen = senzuBean.SenzuBeanRect.Count;
     goku2.CaptureSenzuBean(ref senzuBean.SenzuBeanRect, out senzuBean.SenzuBeanRect, out senzuBean.RectsOnScreen);
     if (OnScreen != senzuBean.SenzuBeanRect.Count)
     {
         goku.score += goku.level;
         SenzuBeanCollectionCountdown = 360;
     }
     SenzuBeanCollectionCountdown--;
     if (SenzuBeanCollectionCountdown == 0)
     {
         SenzuBeanCollectionCountdown = 360;
         goku2.health -= 100;
     }
     bar.HealthANDExpBar(ref goku2.level, ref goku2.health, ref goku2.EXP);
     int Onscreen = senzuBean.SenzuBeanRect.Count;
     goku3.CaptureSenzuBeans2(ref senzuBean.SenzuBeanRect, out senzuBean.SenzuBeanRect, out senzuBean.RectsOnScreen, goku2);
     if (Onscreen != senzuBean.SenzuBeanRect.Count)
     {
         goku.score += goku.level;
         SenzuBeanCollectionCountdown = 360;
     }
 }