Example #1
0
        public static BatEnemyRepresentation CreateBatRepresentation(BatEnemy enemy, EnemyEvent enemyEvent, ContentManager content)
        {
            BatEnemyRepresentation enemyRepresentation = new BatEnemyRepresentation(enemy, enemyEvent);

            enemyRepresentation.LoadContent(content);

            return(enemyRepresentation);
        }
Example #2
0
        private void spawnBatEnemyAt(int x, int y)
        {
            EnemyEvent             enemyEvent          = new EnemyEvent();
            Vector2                tilePosition        = calculateTilePosition(x, y);
            BatEnemy               enemy               = EnemyFactory.CreateBatEntity(world, enemyEvent, tilePosition);
            BatEnemyRepresentation enemyRepresentation = EnemyFactory.CreateBatRepresentation(enemy, enemyEvent, representationManager.Content);
            BatEnemyController     enemyController     = EnemyFactory.CreateBatController(enemy);

            spawnEnemy(enemy, enemyRepresentation, enemyController);
        }