public Hero(Camera camera) { // The cam will move with the hero _camera = camera; WorldPosition = new Vector2(SharedContext.GraphicsDevice.Viewport.Width / 2, SharedContext.GraphicsDevice.Viewport.Height / 2); Health = _startingHealth; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> public void LoadContent(Camera camera) { // Create our hero Hero = new Hero(camera); Hero.LoadContent(); // Create the boss Cats = new List<Cat>(); EndBossBadass boss = new EndBossBadass(); boss.LoadContent(); Cats.Add(boss); Random r = new Random(); Random r2 = new Random(); // Create some roaming cats if (Cats.Count < NUM_OF_CATS_MIN) { InnocentCat cat = new InnocentCat() { GestationState = Cat.GestationStateEnum.Grown }; cat.GestationState = Cat.GestationStateEnum.Grown; cat.WorldPosition = new Vector2(r.Next(-600, 600), r2.Next(-1200, 1200)); Cats.Add(cat); } CurrentQuest = QuestEnum.PreQuest; //for (int i = 0; i < 5; i++) //{ // CatEvoLevel2 cat = new CatEvoLevel2() // { // WorldPosition = new Vector2(r.Next(-600, 600), r2.Next(-600, 600)) // }; // Cats.Add(cat); //} //for (int i = 0; i < 10; i++) //{ // CatEvoLevel3 cat = new CatEvoLevel3() // { // WorldPosition = new Vector2(r.Next(-600, 600), r2.Next(-600, 600)) // }; // Cats.Add(cat); //} Ammo = new List<Ammo>(); FloatingStatuses = new List<FloatingStatus>(); RequestedItemsToRemove = new List<Entity>(); RequestedCatsToAdd = new List<Entity>(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // Set the context SharedContext.GraphicsDevice = GraphicsDevice; SharedContext.Content = Content; SharedContext.MovableEntityManager = _movableEntityManager; SharedContext.EvolutionManager = _evolutionManager; SharedContext.QuestProgressManager = _questProgressManager; SharedContext.SoundEffectManager = _soundEffectManager; SharedContext.HudManager = _hudManager; SharedContext.InputManager = _inputManager; SharedContext.StaticScreenManager = _staticScreenManager; SharedContext.BackgroundManager = new ZoneInstanceBackgroundManager(); _backgroundManager = SharedContext.BackgroundManager; _staticScreenManager.LoadContent(); _camera = new Camera(GraphicsDevice.Viewport); // TODO: use this.Content to load your game content here _soundEffectManager.LoadContent(); _backgroundManager.LoadContent(); _movableEntityManager.LoadContent(_camera); }