Exemple #1
0
        public BulletController(BulletModel bulletModel, BulletView bulletPrefab, string layer)
        {
            BulletModel = bulletModel;

            BulletView = GameObject.Instantiate <BulletView>(bulletPrefab);

            BulletView.Initialize(this, layer);
        }
        public BulletController CreateBullet(int index, string Layer)
        {
            bulletScriptableObject = bulletList.bullets[index];

            bulletModel = new BulletModel(bulletScriptableObject);

            bulletController = new BulletController(bulletModel, bulletView, Layer);



            bulletsCreated.Add(bulletController);

            //Initialize bulletview from health
            HealthBar.Instance.followBullet();

            return(bulletController);
        }
Exemple #3
0
 //Destroy logic.
 public void bulletDestroy()
 {
     BulletModel.DestroyBulletModel(GetBulletModel());
     BulletView.DestroyBulletView(this.BulletView);
 }
Exemple #4
0
 public void DestroyBulletModel(BulletModel bulletModel)
 {
     bulletModel = null;
 }