Example #1
0
        public static WalkerEnemyRepresentation CreateWalkerRepresentation(WalkerEnemy enemy, EnemyEvent enemyEvent, ContentManager content)
        {
            WalkerEnemyRepresentation enemyRepresentation = new WalkerEnemyRepresentation(enemy, enemyEvent);

            enemyRepresentation.LoadContent(content);

            return(enemyRepresentation);
        }
Example #2
0
        private void spawnWalkerEnemyAt(int x, int y)
        {
            EnemyEvent  enemyEvent   = new EnemyEvent();
            Vector2     tilePosition = calculateTilePosition(x, y);
            WalkerEnemy enemy        = EnemyFactory.CreateWalkerEntity(world, enemyEvent, tilePosition);
            WalkerEnemyRepresentation enemyRepresentation = EnemyFactory.CreateWalkerRepresentation(enemy, enemyEvent, representationManager.Content);
            WalkerEnemyController     enemyController     = EnemyFactory.CreateWalkerController(enemy);

            spawnEnemy(enemy, enemyRepresentation, enemyController);
        }