private static void DisplayControlls(DanceKeyGroup danceKeyGroup, DanceSequence danceSequence) { int cnt = 0; for (int i = 1; i <= 9; ++i) { var danceType = danceSequence.GetMoveFromIndex(i); if (danceType != DanceType.NONE) { Sprite sprite = null; switch (danceType) { case DanceType.UP: sprite = instance.redUpArrow; break; case DanceType.DOWN: sprite = instance.redDownArrow; break; case DanceType.LEFT: sprite = instance.redLeftArrow; break; case DanceType.RIGHT: sprite = instance.redRightArrow; break; case DanceType.TWIST: sprite = instance.redXArrow; break; case DanceType.POSE: sprite = instance.redCArrow; break; } danceKeyGroup.SetKeySprite(cnt++, sprite); } } }
public void SetupDanceKeyGroup(DanceSequence danceSequence) { //referenceDanceSequence = danceSequence; for (int i = 0; i < 9; ++i) { hitMoves[i] = false; } danceKeyAppearIndex = 0; ActiveTrimmedDanceSequence = new DanceSequence(); int cnt = 0; int activeIndex = 1; for (int i = 1; i <= 9; ++i) { var danceMove = danceSequence.GetMoveFromIndex(i); if (danceMove != DanceType.NONE) { ++cnt; ActiveTrimmedDanceSequence.SetMoveFromIndex(activeIndex++, danceMove); } } switch (cnt) { case 2: activeDanceKeyGroup = danceKeyGroup2; break; case 3: activeDanceKeyGroup = danceKeyGroup3; break; case 4: activeDanceKeyGroup = danceKeyGroup4; break; case 5: activeDanceKeyGroup = danceKeyGroup5; break; case 6: activeDanceKeyGroup = danceKeyGroup6; break; case 7: activeDanceKeyGroup = danceKeyGroup7; break; default: Debug.LogError("Can't use dance key group that has <2 or >7 keys."); break; } }
public static void DisplayControlls(DanceSequence danceSequence) { activeDanceSequence = new DanceSequence(); int cnt = 0; int activeIndex = 1; for (int i = 1; i <= 9; ++i) { var danceMove = danceSequence.GetMoveFromIndex(i); if (danceMove != DanceType.NONE) { ++cnt; activeDanceSequence.SetMoveFromIndex(activeIndex++, danceMove); } } switch (cnt) { case 2: activeDanceKeyGroup = instance.danceKeyGroup2; break; case 3: activeDanceKeyGroup = instance.danceKeyGroup3; break; case 4: activeDanceKeyGroup = instance.danceKeyGroup4; break; case 5: activeDanceKeyGroup = instance.danceKeyGroup5; break; case 6: activeDanceKeyGroup = instance.danceKeyGroup6; break; case 7: activeDanceKeyGroup = instance.danceKeyGroup7; break; default: Debug.LogError("Can't use dance key group that has <2 or >7 keys."); break; } DisplayControlls(activeDanceKeyGroup, danceSequence); }