Exemplo n.º 1
0
        public Enemy spawn()
        {
            Vector2f newPos = new Vector2f();
            int randX = mRandom.Next(-500, 501);
            int randY = mRandom.Next(-300, 301);

            newPos.X = mPosition.X + randX;
            newPos.Y = mPosition.Y + randY;

            Enemy enemy = new Enemy(newPos, "resources/enemy.png", mPlayer, mWorld);
            enemy.createBody(mPhysicsWorld, BodyType.Dynamic);
            return enemy;
        }
Exemplo n.º 2
0
 public void addEnemy(Enemy _enemy)
 {
     mEnemies.Add(_enemy);
 }