Exemple #1
0
        public override void Enter()
        {
            base.Enter();

            StopFiringTransition.Reset();

            m_CurrentShot = 0;

            FireShot();

            Debug.Log("Enter firing state");
        }
Exemple #2
0
        public override void Update()
        {
            base.Update();

            if (Time.time - m_TimeSinceLastShot > Data.BurstData.Time)
            {
                FireShot();
            }

            if (m_CurrentShot >= Data.BurstData.Count)
            {
                StopFiringTransition.Transition();
            }

            if (CurrentAmmo.Value <= 0)
            {
                StopFiringTransition.Transition();
            }
        }
Exemple #3
0
 public override State TransitionTo()
 {
     return(StopFiringTransition.CheckTransition() ?? base.TransitionTo());
 }