示例#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);
        }
示例#3
0
 //Destroy logic.
 public void bulletDestroy()
 {
     BulletModel.DestroyBulletModel(GetBulletModel());
     BulletView.DestroyBulletView(this.BulletView);
 }
示例#4
0
 public void DestroyBulletModel(BulletModel bulletModel)
 {
     bulletModel = null;
 }