Пример #1
0
 public void OnStateUpdate(OTGCombatSMC _controller)
 {
     UpdateHandlerStateTime(_controller);
     PerformActions(m_onUpdateActions, _controller);
     EvaluateTransitions(_controller);
     IncrementStateTime();
 }
        public static ushort GetCombatantID(OTGCombatSMC _requestingController)
        {
            ushort newID = 0;


            return(newID);
        }
Пример #3
0
 private void EvaluateTransitions(OTGCombatSMC _controller)
 {
     for (int i = 0; i < m_stateTransitions.Length; i++)
     {
         m_stateTransitions[i].MakeDecision(_controller);
     }
 }
Пример #4
0
 private void PerformActions(OTGCombatAction[] _actions, OTGCombatSMC _controller)
 {
     for (int i = 0; i < _actions.Length; i++)
     {
         _actions[i].Act(_controller);
     }
 }
Пример #5
0
 private void SetSoundFXData(OTGCombatSMC _controller)
 {
     if (m_combatAnim.AnimClip == null)
     {
         return;
     }
     _controller.Handler_SFX.SetData(m_combatAnim.SoundFX);
 }
        private void SubscribeToCombatantsList(OTGCombatSMC _requester)
        {
            if (!m_combatants.Contains(_requester))
            {
                m_combatants.Add(_requester);
            }

            m_combatantCount = m_combatants.Count;
        }
Пример #7
0
        private void PlayAnimation(OTGCombatSMC _controller)
        {
            if (m_combatAnim == null || m_combatAnim.AnimClip == null)
            {
                return;
            }

            _controller.Handler_Animation.PlayAnimation(m_combatAnim.AnimClip);
        }
Пример #8
0
        private void SetAnimationData(OTGCombatSMC _controller)
        {
            if (m_combatAnim.AnimClip == null)
            {
                return;
            }

            _controller.Handler_Animation.UpdateAnimData(m_combatAnim.AnimData);
        }
Пример #9
0
 public void MakeDecision(OTGCombatSMC _controller)
 {
     for (int i = 0; i < m_decisions.Length; i++)
     {
         if (!m_decisions[i].Decide(_controller))
         {
             return;
         }
     }
     _controller.OnChangeStateRequested(m_nextState, m_usePreviousState);
 }
Пример #10
0
        public void OnStateEnter(OTGCombatSMC _controller, bool _reentry = false)
        {
            m_stateReEntered = _reentry;
            SetAnimationData(_controller);
            SetHurtColliderData(_controller);
            SetHitColliderData(_controller);
            PerformActions(m_onEnterActions, _controller);
            SetSoundFXData(_controller);

            if (_reentry)
            {
                return;
            }

            ResetStateTime();
            UpdateHandlerStateTime(_controller);
            PlayAnimation(_controller);
        }
Пример #11
0
 public void OnStateAnimUpdate(OTGCombatSMC _controller)
 {
     PerformActions(m_animUpdateActions, _controller);
 }
        private void UnsubscribeFromCombatantsList(OTGCombatSMC _requester)
        {
            m_combatants.Remove(_requester);

            m_combatantCount = m_combatants.Count;
        }
Пример #13
0
 public abstract bool Decide(OTGCombatSMC _controller);
Пример #14
0
 public void OnStateExit(OTGCombatSMC _controller)
 {
     PerformActions(m_onExitActions, _controller);
     m_stateReEntered = false;
 }
 public static void SubscribeToCombatantUpdateLoop(OTGCombatSMC _combatant)
 {
     m_instance.SubscribeToCombatantsList(_combatant);
 }
Пример #16
0
 private void UpdateHandlerStateTime(OTGCombatSMC _controller)
 {
     _controller.Handler_Animation.UpdateStateTime(m_stateTime);
 }
Пример #17
0
        private void SetHurtColliderData(OTGCombatSMC _controller)
        {
            CombatAnimHurtCollisionData data = m_combatAnim.HurtCollisionData;

            _controller.Handler_Collision.SetHurtColliderData(data);
        }
Пример #18
0
        private void SetHitColliderData(OTGCombatSMC _controller)
        {
            CombatAnimHitCollisionData data = m_combatAnim.HitCollisionData;

            _controller.Handler_Collision.HitCollider.OnDataUpdate(data);
        }
 public static void UnsubscribeFromCombatantUpdateLoop(OTGCombatSMC _combatant)
 {
     m_instance.UnsubscribeFromCombatantsList(_combatant);
 }
Пример #20
0
 public abstract void Act(OTGCombatSMC _controller);