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 #2
0
 //Linking view and controller.
 public void Initialize(BulletController controller, string Layer)
 {
     this.bulletController = controller;
     this.gameObject.layer = LayerMask.NameToLayer(Layer);
 }
 public void DestroyBullet(BulletController bulletController)
 {
     bulletController.bulletDestroy();
 }