public Gun(IGunStrategy gunStrat, Transform leftBarrelEnd, Transform rightBarrelEnd) { barrelEnds = new Transform[2]; _isBullet = true; this.gunStrat = gunStrat; this.barrelEnds[0] = leftBarrelEnd; this.barrelEnds[1] = rightBarrelEnd; //reticle = GameObject.FindGameObjectWithTag("CrossHair").GetComponent<RectTransform>(); cameraTransform = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Transform>(); }
public void setGunStrat(IGunStrategy strat, Transform leftBarrelEnd, Transform rightBarrelEnd) { gunStrat = strat; barrelEnds[0] = leftBarrelEnd; barrelEnds[1] = rightBarrelEnd; }