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); }
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); }
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; } } }
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; }
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); }