示例#1
0
 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>();
 }
示例#2
0
 public void setGunStrat(IGunStrategy strat, Transform leftBarrelEnd, Transform rightBarrelEnd)
 {
     gunStrat      = strat;
     barrelEnds[0] = leftBarrelEnd;
     barrelEnds[1] = rightBarrelEnd;
 }