Beispiel #1
0
        public EnemyController(EnemyModel enemyModel, EnemyView EnemyPrefab)
        {
            EnemyModel = enemyModel;

            EnemyView = GameObject.Instantiate <EnemyView>(EnemyPrefab);

            EnemyView.initialize(this);
        }
Beispiel #2
0
        public EnemyController CreateEnemyTank()
        {
            enemyModel = new EnemyModel(enemyTankScriptableObject);

            enemyController = new EnemyController(enemyModel, enemyView);

            enemyList.Add(enemyController);

            SceneService.Instance.followEnemey();
            HealthBar.Instance.followHealthEnemey();

            Debug.Log(enemyList.Count + " Updated enemy count!!!");
            Debug.Log("MyID is " + enemyList[0].EnemyModel.myID);

            return(enemyController);
        }
Beispiel #3
0
 //Destroy EnemyTank stuff.
 public void DestroyStuff()
 {
     EnemyModel.modelDestroy(getModel());
     EnemyView.enemyDestroyView(this.EnemyView);
 }
 //Setting enemymodel to null.
 public void modelDestroy(EnemyModel enemyModel)
 {
     enemyModel = null;
 }