public int Tick(SelectInput input) { selectSound = false; if (input.Left && !input.Right) { if (stageIndex == 0) { stageIndex = stages.Length - 1; } else { stageIndex--; } selectSound = true; } else if (input.Right && !input.Left) { stageIndex = (stageIndex + 1) % stages.Length; selectSound = true; } if (input.Ok) { return stageIndex; } if (input.GotoTitle) { return GOTO_TITLE; } return NONE; }
public int Tick(SelectInput input) { selectSound = false; if (input.Left && !input.Right) { if (stageIndex == 0) { stageIndex = stages.Length - 1; } else { stageIndex--; } selectSound = true; } else if (input.Right && !input.Left) { stageIndex = (stageIndex + 1) % stages.Length; selectSound = true; } if (input.Ok) { return(stageIndex); } if (input.GotoTitle) { return(GOTO_TITLE); } return(NONE); }