Esempio n. 1
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. 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);
     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. 3
0
 public void DeathDraw(SpriteBatch spriteBatch, Extra extra, font Font, Goku goku)
 {
     spriteBatch.Draw(extra.DeadBGPic, new Rectangle(0,0,1100,720), Color.White);
     spriteBatch.DrawString(Font.LevelUp, "GAME OVER", new Vector2(200, 250), Color.Red);
     spriteBatch.DrawString(Font.SelectionFont, "Press [ENTER] to Start Again", new Vector2(350, 600), Color.Red);
     spriteBatch.DrawString(Font.SelectionFont, "You're Score: " + goku.score, new Vector2(100, 100), Color.Red);
     spriteBatch.DrawString(Font.SelectionFont, "High Score: " + goku.HighScore, new Vector2(100, 150), Color.Red);
 }
Esempio n. 4
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. 5
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. 6
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. 7
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. 8
0
 private void BuuStuff(Villain buu, Goku goku)
 {
     buu.Movement(ref goku.level, ref goku.X, ref goku.Y);
     buu.Attack(ref goku.health, out goku.health, ref goku.Position);
     if (goku.health <= 0)
     {
        Dead = true;
         if (goku.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. 9
0
        public void Initialize(Goku goku, Death death, SenzuBeans senzuBean, Villain buu)
        {
            goku.health = 100;
            goku.EXP = 0;
            for (int i = 0; i < senzuBean.SenzuBeanRect.Count; i++)
            {
                senzuBean.SenzuBeanRect.RemoveAt(i);
            }

            senzuBean.RectsOnScreen = false;
            buu.X = 0;
            buu.Y = 30;
            goku.Lvled = false;
            goku.X = 500;
            goku.Y = 350;
            goku.level = 0;
            goku.score = 0;
            death.ReStart = false;
            Dead = false;
        }
Esempio n. 10
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. 11
0
 private void LevelUpDraw(SpriteBatch spriteBatch, Goku goku, font Font)
 {
     if (goku.Lvled == true)
     {
         spriteBatch.DrawString(Font.LevelUp, "LEVEL UP!", new Vector2(200, 200), Color.Red);
         timer++;
         if (timer == 90)
         {
             goku.Lvled = false;
             timer = 0;
         }
     }
 }
Esempio n. 12
0
 public void DeathCode(Goku goku)
 {
     if (Keyboard.GetState().IsKeyDown(Keys.Enter))
         ReStart = true;
 }
Esempio n. 13
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;
     }
 }
Esempio n. 14
0
 private void VillainStuff(Ch2Villain Villain2, Ch2Goku goku2, Ch2Goku MirrorGoku, Extra extra, Goku goku)
 {
     Villain2.CH4 = true;
     chance = rand.Next(0, 300);
     Villain2.Movement(ref goku2.level,ref goku2.X,ref goku2.Y,ref MirrorGoku.X,ref MirrorGoku.Y, extra, ref chance);
     Villain2.Attack(ref goku2.health, out goku2.health, ref goku2.Position, ref MirrorGoku.Position);
     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;
         }
     }
     Villain2.CH4 = false;
 }