Exemplo n.º 1
0
    public void Awake()
    {
        bulletPool = GetComponent <NormalBulletGenerator>();
        misilPool  = GetComponent <MisilBulletGenerator>();

        view              = new ViewPlayer();
        model             = new ModelPlayer(this.transform, shield);
        controller        = new ControllerPlayer(model, view, this, camara);
        automaticStrategy = new Automatic(canShot, fireRate, bullet, mainGun, bulletPool);
        tripleStrategy    = new Triple(canShot, fireRate, bullet, mainGun, sideGunL, sideGunR, bulletPool);
        misilStrategy     = new Misil(canShot, fireRate, bullet, mainGun, sideGunL, sideGunR, bulletPool, misilGunL, misilGunR, misilPool);
    }
Exemplo n.º 2
0
 public Misil(bool pcanShot, float pfireRate, GameObject pBullet, Transform pMainGun, Transform pSideGunL, Transform pSideGunR,
              NormalBulletGenerator pBulletPool, Transform pMisilGunL, Transform pMisilGunR, MisilBulletGenerator pMisilPool)
 {
     _canShot    = pcanShot;
     _fireRate   = pfireRate;
     _bullet     = pBullet;
     _mainGun    = pMainGun;
     _sideGunL   = pSideGunL;
     _sideGunR   = pSideGunR;
     _bulletPool = pBulletPool;
     _misilGunL  = pMisilGunL;
     _misilGunR  = pMisilGunR;
     _misilPool  = pMisilPool;
 }
Exemplo n.º 3
0
 public void SetBulletPool(MisilBulletGenerator bulletPool)
 {
     _bulletPool = bulletPool;
 }
Exemplo n.º 4
0
 private void Awake()
 {
     _instance   = this;
     _misiltPool = new Pool <MisilHero>(amount, BulletFactory, MisilHero.InitializeBullet, MisilHero.DisposeBullet, true);
 }