Beispiel #1
0
 public void RemoveEntry(IComboEntry entry)
 {
     this.dictionary.Remove(entry.Skill.SkillHandle);
     this.orderedEntries    = this.dictionary.OrderBy(pair => pair.Value.ExecutionDelay);
     this.MinExecutionDelay = this.orderedEntries.First().Value.ExecutionDelay;
 }
Beispiel #2
0
            public IComboEntry NextEntry(CharacterBehaviorComponent.CharacterBehaviorAction action, IComboEntry previousMove, BrawlerAction currentAction)
            {
                if (action is DashBehaviorComponent.DashAction)
                {
                    foreach (IComboEntry comboEntry in comboEntries)
                    {
                        if (ComboMove.ComboMoveType.Dash == comboEntry.Move.Type)
                        {
                            return(comboEntry);
                        }
                    }
                }
                else if (action is AttackBehaviorComponent.AttackAction attackAction)
                {
                    foreach (IComboEntry comboEntry in comboEntries)
                    {
                        if (comboEntry.Move.Equals(attackAction) && (null == previousMove || !Move.RequireHit || !previousMove.Move.IsAttack || currentAction.DidHit))
                        {
                            return(comboEntry);
                        }
                    }

                    // if we failed and this is the opener
                    // we'll be kind and fall back on the directionless attack
                    if (null == previousMove)
                    {
                        if (GameManager.Instance.DebugBrawlers)
                        {
                            Debug.Log($"Fallback on directionless attack");
                        }

                        foreach (IComboEntry comboEntry in comboEntries)
                        {
                            if (comboEntry.Move.IsDirectionlessAttack)
                            {
                                return(comboEntry);
                            }
                        }
                    }
                }

                return(null);
            }