public void SpawnEnemy(Vector3 enemySpawnerPos, Quaternion enemySpawnerRotation, int enemyIndex)

        {
            EnemyModel      model      = new EnemyModel(EnemyList.enemyScriptableObject[enemyIndex]);
            EnemyController controller = new EnemyController(model, enemyView, enemySpawnerPos, enemySpawnerRotation, enemyIndex, EnemyList.enemyScriptableObject[enemyIndex]);

            enemyTanks.Add(controller);
        }
Exemplo n.º 2
0
 public EnemyController(EnemyModel enemyModel, EnemyView enemyView, Vector3 spawnerPos, Quaternion spawnerRotation, int enemyNumber, EnemyScriptableObject enemyScriptableObject)
 {
     EnemyModel      = enemyModel;
     SpawnerPos      = spawnerPos;
     SpawnerRotation = spawnerRotation;
     EnemyNumber     = enemyNumber;
     EnemyView       = GameObject.Instantiate <EnemyView>(enemyView, SpawnerPos, spawnerRotation);
     EnemyView.InitializeController(this);
     EnemyView.SetViewDetails();
 }
Exemplo n.º 3
0
        public void SetViewDetails( )
        {
            model    = controller.EnemyModel;
            tankType = model.EnemyTankType;

            SetTankSpeed(model.EnemySpeed, model.EnemyRotation);
            SetFireRate(model.EnemyFireRateDelay);
            SetTankHealth(model.EnemyHealth);
            SetTankDamage(model.EnemyDamage);
            SetTankColor(model.EnemyColor);
        }