/// <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>();
        }
示例#2
0
        private void RestartGame()
        {
            _movableEntityManager.Hero.RestoreHealth();
            _movableEntityManager.CurrentQuest = MovableEntityManager.QuestEnum.PreQuest;
            _staticScreenManager.CurrentScreen = StaticScreenManager.CurrentScreenEnum.Start;
            _questProgressManager.NumberOfMutatedKittensKilled = 0;
            _questProgressManager.NumberOfInnocentKittensKilled = 0;

            _movableEntityManager.Cats.Clear();
            EndBossBadass boss = new EndBossBadass();
            boss.LoadContent();
            _movableEntityManager.Cats.Add(boss);

            _movableEntityManager.Ammo.Clear();
            _movableEntityManager.FloatingStatuses.Clear();
            _movableEntityManager.Hero.HeroWeapon = Hero.HeroWeaponEnum.Sword;

            // Move the hero in case he's in trouble
            int yOffset = 0;
            if (_movableEntityManager.Hero.WorldPosition.Y < 0)
                yOffset = 150;
            else
                yOffset = -150;

            _movableEntityManager.Hero.WorldPosition = new Vector2(_movableEntityManager.Hero.WorldPosition.X,
                _movableEntityManager.Hero.WorldPosition.Y + yOffset);
            _movableEntityManager.Hero.Camera.Position = new Vector2(_movableEntityManager.Hero.Camera.Position.X,
                _movableEntityManager.Hero.Camera.Position.Y + yOffset);
        }