Remove special actions from `Stage` constructor

This commit is contained in:
clayton 2024-08-07 14:36:04 -07:00
parent e7f9bba9b5
commit 5ad255ecbe
No known key found for this signature in database
GPG Key ID: 0E5962B8D84F9B2E
2 changed files with 4 additions and 5 deletions

View File

@ -66,13 +66,12 @@ public ManiaPlayfield(List<StageDefinition> stageDefinitions)
Content = new[] { new Drawable[stageDefinitions.Count] } Content = new[] { new Drawable[stageDefinitions.Count] }
}); });
var normalColumnAction = ManiaAction.Key1; var columnAction = ManiaAction.Key1;
var specialColumnAction = ManiaAction.Special1;
int firstColumnIndex = 0; int firstColumnIndex = 0;
for (int i = 0; i < stageDefinitions.Count; i++) for (int i = 0; i < stageDefinitions.Count; i++)
{ {
var newStage = new Stage(firstColumnIndex, stageDefinitions[i], ref normalColumnAction, ref specialColumnAction); var newStage = new Stage(firstColumnIndex, stageDefinitions[i], ref columnAction);
playfieldGrid.Content[0][i] = newStage; playfieldGrid.Content[0][i] = newStage;

View File

@ -59,7 +59,7 @@ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos)
private ISkinSource currentSkin = null!; private ISkinSource currentSkin = null!;
public Stage(int firstColumnIndex, StageDefinition definition, ref ManiaAction normalColumnStartAction, ref ManiaAction specialColumnStartAction) public Stage(int firstColumnIndex, StageDefinition definition, ref ManiaAction columnStartAction)
{ {
this.firstColumnIndex = firstColumnIndex; this.firstColumnIndex = firstColumnIndex;
Definition = definition; Definition = definition;
@ -138,7 +138,7 @@ public Stage(int firstColumnIndex, StageDefinition definition, ref ManiaAction n
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Width = 1, Width = 1,
Action = { Value = isSpecial ? specialColumnStartAction++ : normalColumnStartAction++ } Action = { Value = columnStartAction++ }
}; };
topLevelContainer.Add(column.TopLevelContainer.CreateProxy()); topLevelContainer.Add(column.TopLevelContainer.CreateProxy());