Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lefty flip drum inputs #99

Merged
merged 2 commits into from
Apr 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Assets/Script/PlayMode/DrumsTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,28 @@ private void GHDrumHitAction(int drum) {
}

private void DrumHitAction(int drum, bool cymbal) {
// invert input in case lefty flip is on, bots don't need it
if (player.leftyFlip && !input.botMode){
switch (drum){
case 0:
drum = kickIndex == 4 ? 3 : 4;
break;
case 1:
drum = kickIndex == 4 ? 2 : 3;
break;
case 2:
drum = kickIndex == 4 ? 1 : 2;
break;
case 3:
drum = kickIndex == 4 ? 0 : 1;
break;
case 4:
if (kickIndex == 5){
drum = 0;
}
break;
}
}
if (drum != kickIndex) {
// Hit effect
drums[drum].Pulse();
Expand Down