Esempio 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;
         }
     }
 }
Esempio n. 2
0
 public void Code(Goku goku, SenzuBeans senzuBean, Villain buu, Redbull redBull )
 {
     SenzuBeanzStuff(senzuBean); //senzuBeanStuff HAS to be above GokuStuff.
     GokuStuff(goku, senzuBean, redBull);
     BuuStuff(buu, goku);
     RedBullStuff(redBull, goku, buu);
 }
Esempio n. 3
0
 public void Code(Ch2Goku goku2, Ch2Goku MirrorGoku, SenzuBeans senzuBean,Goku goku,Redbull redBull, Ch2Villain Villain2, Extra extra)
 {
     SenzuBeanStuff(senzuBean);
     GokuStuff(goku2, goku, senzuBean, redBull);
     MirrorGokuStuff(MirrorGoku,goku2,senzuBean);
     score = goku.score * goku2.level;
     RedBullStuff(redBull,goku2, MirrorGoku,Villain2);
     VillainStuff(Villain2, goku2,MirrorGoku,extra);
 }
Esempio n. 4
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);
 }
Esempio n. 5
0
        public void Code(Ch2Goku goku2, Ch2Goku MirrorGoku, SenzuBeans senzuBean, Goku goku, Redbull redBull, Ch2Villain Villain2, Extra extra, KeyboardState oldkeyboard)
        {
            SenzuBeanStuff(senzuBean);
            GokuStuff(goku2, goku,MirrorGoku, senzuBean, redBull);
            score = goku.score * goku2.level;
            RedBullStuff(redBull, goku2, MirrorGoku, Villain2);
            VillainStuff(Villain2, goku2, MirrorGoku, extra, goku);
            if (Keyboard.GetState().IsKeyDown(Keys.C) && oldkeyboard.IsKeyUp(Keys.C))
            {
                if (ToonChoice == 0)
                { ToonChoice = 1; }

                else if (ToonChoice == 1)
                    ToonChoice = 0;
            }
        }
Esempio n. 6
0
 public void Draw(SpriteBatch spriteBatch, font Font, Extra extra, Goku goku,SenzuBeans senzuBean, Villain buu, Redbull redBull)
 {
     spriteBatch.Draw(extra.GameplayBackgroundPic, BGRect, Color.White);
     spriteBatch.Draw(goku.Sprite, goku.Position, Color.White);
     foreach (Rectangle rect in senzuBean.SenzuBeanRect)
         spriteBatch.Draw(senzuBean.Pic, rect, Color.White);
     spriteBatch.Draw(extra.pixel, bar.HealthRect, Color.Red);
     spriteBatch.Draw(extra.pixel, bar.EXPRect, Color.WhiteSmoke);
     LevelUpDraw(spriteBatch, goku, Font);
     spriteBatch.DrawString(Font.SelectionFont, "Health: " + goku.health, new Vector2(5, -7), Color.Black);
     spriteBatch.DrawString(Font.SelectionFont, "Level: " + goku.level, new Vector2(5, 690), Color.Black);
     spriteBatch.DrawString(Font.SelectionFont, "You're Score: " + goku.score * goku.level, new Vector2(570, 0), Color.Black);
     spriteBatch.Draw(buu.Sprite, buu.Position, Color.White);
     foreach (Rectangle rect in redBull.redBullRect)
         spriteBatch.Draw(redBull.redBullPic, rect, Color.White);
     redBull.RedbullIconDraw(spriteBatch, Font);
 }
Esempio n. 7
0
 public void Draw(SpriteBatch spriteBatch, Extra extra, Ch2Goku goku2, Ch2Goku MirrorGoku, SenzuBeans senzuBean, font Font, Redbull redBull, Ch2Villain Villain2)
 {
     spriteBatch.Draw(extra.GameplayBackgroundPic, new Rectangle(0, 0, 545, 720), Color.White);
     spriteBatch.Draw(extra.Namek, new Rectangle(540, 0, 545, 720), Color.White);
     spriteBatch.Draw(goku2.Sprite, goku2.Position, Color.White);
     spriteBatch.Draw(MirrorGoku.Sprite, MirrorGoku.Position, Color.White);
     foreach (Rectangle rect in senzuBean.SenzuBeanRect)
         spriteBatch.Draw(senzuBean.Pic, rect, Color.White);
     spriteBatch.Draw(extra.pixel, bar.HealthRect, Color.Red);
     spriteBatch.Draw(extra.pixel, bar.EXPRect, Color.WhiteSmoke);
     spriteBatch.DrawString(Font.SelectionFont, "Health: " + goku2.health, new Vector2(5, -7), Color.Black);
     spriteBatch.DrawString(Font.SelectionFont, "Level: " + goku2.level, new Vector2(5, 690), Color.Black);
     spriteBatch.DrawString(Font.SelectionFont, "You're Score: " + score, new Vector2(570, 0), Color.Green);
        foreach (Rectangle rect in redBull.redBullRect)
         spriteBatch.Draw(redBull.redBullPic, rect, Color.White);
        redBull.RedbullIconDraw(spriteBatch, Font);
        spriteBatch.Draw(Villain2.Sprite, Villain2.Position, Color.White);
 }
Esempio n. 8
0
 private void RedBullStuff(Redbull redBull, Ch2Goku goku2, Ch2Goku MirrorGoku, Ch2Villain Villain2, Ch2Villain Villain3)
 {
     redBull.RedBullStuff();
     if (redBull.Spawn == true)
     {
         redBull.redBullRect.Add(new Rectangle(rand.Next(0, 1010), rand.Next(0, 700), 50, 50));
         redBull.Spawn = false;
     }
     redBull.RedBullBoost3(ref goku2.Position,ref  MirrorGoku.Position, ref Villain2.Position,ref Villain3.Position);
 }
Esempio n. 9
0
 private void RedBullStuff(Redbull redBull, Goku goku, Villain buu)
 {
     redBull.RedBullStuff();
        if (redBull.Spawn == true)
     {
         redBull.redBullRect.Add(new Rectangle(rand.Next(0, 1010), rand.Next(0, 700), 50, 50));
         redBull.Spawn = false;
     }
        redBull.RedBullBoost(ref goku.Position, ref buu.Position);
 }
Esempio n. 10
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;
     }
 }