예제 #1
0
파일: Spawner.cs 프로젝트: Jamsterx1/Titan
        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;
        }
예제 #2
0
 public void addEnemy(Enemy _enemy)
 {
     mEnemies.Add(_enemy);
 }