Jump to content
  • Advertisement

Tim Ogunmakin

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

107 Neutral

About Tim Ogunmakin

  • Rank
    Newbie
  1. Tim Ogunmakin

    [Solved] Loading enemies method

    Fixed it all by re-doing the whole spawning code myself. Note to self: try something first before looking at books to do it   thanks for the help!
  2. Tim Ogunmakin

    [Solved] Loading enemies method

      Ive now done this, I've moved the loading enemies into the Game class in the LoadContent() region however I'm getting the same thing :S   Im using "Learning XNA 4.0" by Aaron reed :)
  3. Tim Ogunmakin

    [Solved] Loading enemies method

      I dont have a Game1 function, most of my code is in the GameplayScreen class, here is my heirarchy:  
  4. I'm trying to spawn a new enemy in my game, I've been following a book to do this :   public void LoadEnemies() { int randY = random.Next(100,400); if (spawnzz >= 1) { spawnzz = 0; if (enemies.Count < 4) { enemies.Add(new EnemySpawn(Content.Load("Graphics/Sprites/enemy"), new Vector2(1100, randY))); } } for (int i = 0; i < enemies.Count; i++) { if (!enemies[i].isVisible) { enemies.RemoveAt(i); i--; } } } "enemies.Add(new EnemySpawn(Content.Load("Graphics/Sprites/enemy"), new Vector2(1100, randY)));" The part there it says Content.Load is where it comes up in red and displays "The name content does not exist in current context" Help! Regards, Tim
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!