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