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); }
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; }
public void SetBulletPool(MisilBulletGenerator bulletPool) { _bulletPool = bulletPool; }
private void Awake() { _instance = this; _misiltPool = new Pool <MisilHero>(amount, BulletFactory, MisilHero.InitializeBullet, MisilHero.DisposeBullet, true); }