I’m getting this problem even though it’s working as intended and would really like to fix this problem.
void Update ()
{
if (barbaricInput.ComboStore.Count > 0) {
if (!canComboAttack) {
if (barbaricInput.ComboStore [0] == ButtonPress.RIGHT && barbaricInput.ComboStore [1] == ButtonPress.RIGHT) {
Debug.Log ("Combo Attack");
canComboAttack = true;
}
}
} else {
canComboAttack = false;
}
}
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ButtonPress].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
TheBarbaricCombo.Update () (at Assets/TheBarbaricCombo.cs:25)