예제 #1
0
        public override void MainAction()
        {
            if (!_readyToShoot)
            {
                return;
            }
            if (_clips.Count() == 0 || _clips.First().AmmoCount == 0)
            {
                return;
            }

            base.MainAction();

            Ammo am = Instantiate(ammo, _shotPosition.position, _shotPosition.rotation);

            am.AddForce(_shotPosition.transform.forward * _force);
            _readyToShoot = false;

            Invoke(ReadyShoot, _rechargeTime);
        }