public bool FiringBegin()
        {
            if (Firing)
            {
                return(false);
            }
            if (!PerformCanFire())
            {
                return(false);
            }

            firing            = true;
            firingCurrentTime = 0;

            if (FireAnimation.Value != null)
            {
                EventAnimationBegin(FireAnimation, delegate()
                {
                    EventAnimationBegin(null);
                });
            }

            SoundPlay(SoundFiringBegin);

            FiringBeginEvent?.Invoke(this);
            return(true);
        }
Exemple #2
0
        public bool FiringBegin()
        {
            if (Firing)
            {
                return(false);
            }
            if (!PerformCanFire())
            {
                return(false);
            }

            firing            = true;
            firingCurrentTime = 0;
            SoundPlay(SoundFiringBegin);
            FiringBeginEvent?.Invoke(this);
            return(true);
        }