Exemple #1
0
 public void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         _launcher.Shoot(this);
     }
 }
        void Update()
        {
            if (Target == null)
            {
                return;
            }

            RotateTowardsBug();
            if (shooting != null)
            {
                shooting.Shoot(this);
            }
        }
Exemple #3
0
        public void Trigger()
        {
            switch (_state)
            {
            case GunTriggerState.Locked:
                triggerLockedEvent.Invoke();
                return;

            case GunTriggerState.None:
                triggerPulledEvent.Invoke();
                _shootModule.Shoot();
                break;
            }
        }
Exemple #4
0
 private void Shoot()
 {
     if (weapon != null)
     {
         if (player.UsePixels(weapon.PixelCost))
         {
             weapon.Shoot();
             nextTimeToFire  = Time.time;
             nextTimeToFire += weapon.FireRate;
         }
     }
     else
     {
         Debug.Log("No weapon!");
     }
 }
 public void Shoot()
 {
     shooter.Shoot();
 }
Exemple #6
0
 public void Shoot()
 {
     _shoot.Shoot();
 }
Exemple #7
0
 public void Shoot()
 {
     _shootImplementation.Shoot();
 }
Exemple #8
0
 /// <summary> Shoots towards a direction.</summary>
 /// <param name="direction"> Direction to shoot at.</param>
 public void Shoot(Vector3 direction)
 {
     m_Weapon.Shoot(direction);
 }