Example #1
0
        public bool AdvanceCombo(CharacterBehaviorComponent.CharacterBehaviorAction action)
        {
            bool isOpener = null == _currentComboEntry;

            if (isOpener)
            {
                _currentComboEntry = Brawler.BrawlerCombo.RootComboEntry.NextEntry(action, null, Brawler.CurrentAction);
                if (null == _currentComboEntry)
                {
                    Debug.LogWarning($"Unable to find combo opener for action {action}");
                }
            }
            else
            {
                _currentComboEntry = _currentComboEntry.NextEntry(action, _currentComboEntry, Brawler.CurrentAction);
            }

            if (null == _currentComboEntry)
            {
                _currentComboEntry = FudgeFailedCombo(action);
                if (null == _currentComboEntry)
                {
                    return(false);
                }
            }

            ActionHandler.OnComboMove(isOpener, _currentComboEntry.Move, Brawler.CurrentAction);

            if (GameManager.Instance.DebugBrawlers)
            {
                DisplayDebugText($"Advance combo: {_currentComboEntry.Move.Id}", Color.green);
            }

            return(true);
        }
Example #2
0
        public void Idle()
        {
            Brawler.CurrentAction = new BrawlerAction(BrawlerAction.ActionType.Idle);

            _currentComboEntry = null;
            _velocityModifier  = Vector3.zero;

            ActionHandler.OnIdle();
        }
Example #3
0
        public void ComboFail()
        {
            if (GameManager.Instance.DebugBrawlers)
            {
                DisplayDebugText("Combo failed / exhausted", Color.red);
            }

            _currentComboEntry = null;
            _velocityModifier  = Vector3.zero;

            _comboFailEffectTrigger.Trigger();
        }
Example #4
0
 public void OnReSpawn()
 {
     _currentComboEntry = null;
 }