Esempio n. 1
0
        public void spawnBoss()
        {
            Vector2 bossPos = new Vector2(0.0f, -500.0f);
            Enemy1  e       = characterManager.addEnemy(bossPos, 3);

            e.setChase(true);
            for (int i = 0; i < 35; i++)
            {
                Vector2 p    = bossPos + new Vector2(Game1.random.Next(-200, 201), Game1.random.Next(50, 151));
                int     type = Game1.random.Next(0, 3);
                Enemy1  e2   = characterManager.addEnemy(p, type);
                e2.setChase(true);
            }
        }
Esempio n. 2
0
        public void randomSpawnSingleEnemy(Vector2 p)
        {
            int    type  = 0;
            double typeP = Game1.random.NextDouble();

            if (typeP > (0.9f - (0.1f * currentLevel)))
            {
                type = 2;
            }
            else if (typeP > (0.7f - (0.1f * currentLevel)))
            {
                type = 1;
            }
            Enemy1 e1 = characterManager.addEnemy(p, type);

            double chaseP = Game1.random.NextDouble();

            if (chaseP > (0.95f - (0.02f * currentLevel)))
            {
                e1.setChase(true);
            }
        }