void CheckForCombo(int pos) { SpellType t = SpellType.NULL; DancePose[] current = null; if (rain[0].IsPoseHit(buffer[0].left, buffer[0].right)) { t = SpellType.RAIN; current = rain; } else if (fire[0].IsPoseHit(buffer[0].left, buffer[0].right)) { t = SpellType.FIRE; current = fire; } else if (wind[0].IsPoseHit(buffer[0].left, buffer[0].right)) { t = SpellType.WIND; current = wind; } //if the first pose is part of a dance check the other poses if (current != null) { if (pos > 0 && pos < current.Length && !current[pos].IsPoseHit(buffer[pos].left, buffer[pos].right, true)) { ReorderBuffer(pos); return; } hitCounter = pos; successCircle.RingEffect(); if (pos == current.Length - 1) { spellcaster.castSpell(t, Vector2.zero); } } else if (pos > 1) { ReorderBuffer(pos); } }