Esempio n. 1
0
    private void Start()
    {
        ScoreManager.OnUpWeapon += UpgradeGun;

        Init();
        shootEnabled   = true;
        shootTimeLimit = 0.2f;

        myView     = transform.GetChild(0).GetComponent <IPlayerView>();
        bulletPool = GameObject.FindGameObjectWithTag("bulletPool").GetComponent <IBulletsPool>();
    }
    private void Start()
    {
        ScoreManager.OnUpWeapon += BulletOffset;

        lifetime   = 2f;
        bulletPool = GameObject.FindGameObjectWithTag("bulletPool").transform;
        bulletData = bulletPool.GetComponent <IBulletsPool>();

        //myViewRend = transform.GetChild(0).GetComponent<SpriteRenderer>();
        //myViewRend.color = BulletsManager.Instance.weaponData.bulletColor;
        //BulletsManager.OnUpBullet += ChangeColor;
    }
Esempio n. 3
0
 public void SetPool(IBulletsPool pool)
 {
     _pool = pool;
 }