예제 #1
0
파일: Gun.cs 프로젝트: scottbass47/gsts
        public void Shoot()
        {
            BulletShot = GunModel.TryShoot();

            if (BulletShot)
            {
                ShootBullet();
            }
        }
예제 #2
0
 public void Start()
 {
     gunModel = new GunModel(
         new BottomlessClip(),
         new AccurateAim(AccurateShotRange),
         new GunPositioning(center, hand, gun, pivot, barrel),
         0.0f,
         stats
         );
     rotateBullet = true;
 }
예제 #3
0
        private void Start()
        {
            events = GameManager.Instance.Events;

            gunModel = new GunModel(
                new BasicClip(baseGunStats.ClipSize),
                new AccurateAim(accurateShootingRange),
                new GunPositioning(center, hand, gun, pivot, barrel),
                baseGunStats.ReloadRate,
                GunStats
                );

            GunModel.OnReloadBegin += OnReloadBegin;
            GunModel.OnChangeInBulletsLeftInClip += OnChangeInBulletsLeftInClip;
            GunModel.OnChangeInClipSize          += OnChangeInClipSize;

            // Triggers updates in the HUD
            GunModel.ChangeClipSize(baseGunStats.ClipSize);
        }
예제 #4
0
파일: Gun.cs 프로젝트: scottbass47/gsts
 private void Update()
 {
     GunModel.Update(Time.deltaTime);
 }
예제 #5
0
파일: Gun.cs 프로젝트: scottbass47/gsts
 public virtual void AimAt(Vector2 target)
 {
     GunModel.AimAt(target);
     UpdateGunRenderer();
 }