コード例 #1
0
 public Automatic(bool pcanShot, float pfireRate, GameObject pBullet, Transform pMainGun, NormalBulletGenerator pBulletPool)
 {
     _canShot    = pcanShot;
     _fireRate   = pfireRate;
     _bullet     = pBullet;
     _mainGun    = pMainGun;
     _bulletPool = pBulletPool;
 }
コード例 #2
0
 public Triple(bool pcanShot, float pfireRate, GameObject pBullet, Transform pMainGun, Transform pSideGunL, Transform pSideGunR, NormalBulletGenerator pBulletPool)
 {
     _canShot    = pcanShot;
     _fireRate   = pfireRate;
     _bullet     = pBullet;
     _mainGun    = pMainGun;
     _sideGunL   = pSideGunL;
     _sideGunR   = pSideGunR;
     _bulletPool = pBulletPool;
 }
コード例 #3
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);
    }
コード例 #4
0
 public void SetBulletPool(NormalBulletGenerator bulletPool)
 {
     _bulletPool = bulletPool;
 }
コード例 #5
0
 private void Awake()
 {
     _instance   = this;
     _bulletPool = new Pool <BulletHero>(amount, BulletFactory, BulletHero.InitializeBullet, BulletHero.DisposeBullet, true);
 }