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

            enemyRepresentation.LoadContent(content);

            return(enemyRepresentation);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public static WalkerEnemy CreateWalkerEntity(World world, EnemyEvent enemyEvent, Vector2 enemyPosition)
        {
            ConfigFile configFile    = Enemy.GetEnemyConfigFile();
            int        health        = configFile.SettingGroups[walkerGeneralSettings].Settings["health"].GetValueAsInt();
            float      hitDelay      = configFile.SettingGroups[walkerGeneralSettings].Settings["hitDelay"].GetValueAsFloat();
            float      recoveryDelay = configFile.SettingGroups[walkerGeneralSettings].Settings["recoveryDelay"].GetValueAsFloat();

            WalkerEnemy enemy = new WalkerEnemy(world, enemyEvent);

            enemy.SetUpEnemy(enemyPosition, health, hitDelay, recoveryDelay);

            return(enemy);
        }
Esempio n. 4
0
        public static WalkerEnemyController CreateWalkerController(WalkerEnemy enemy)
        {
            WalkerEnemyController enemyController = new WalkerEnemyController(enemy);

            return(enemyController);
        }