Add number of jocker as game parameter.
+ Missing input handler for player switch action.
This commit is contained in:
1 parent
cfca322fcd
commit
5360b99745
3 files changed
+22
-7
No files matched your search
@@ -104,6 +104,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
public int NumPlayerTeam1;
|
public int NumPlayerTeam1;
|
||||||
public int NumPlayerTeam2;
|
public int NumPlayerTeam2;
|
||||||
public int NumFields;
|
public int NumFields;
|
||||||
|
public int NumJockers;
|
||||||
public int Team;
|
public int Team;
|
||||||
public List<Guid> ProfileIDsTeam1;
|
public List<Guid> ProfileIDsTeam1;
|
||||||
public List<Guid> ProfileIDsTeam2;
|
public List<Guid> ProfileIDsTeam2;
|
||||||
@@ -148,6 +149,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
NumPlayerTeam1 = 2,
|
NumPlayerTeam1 = 2,
|
||||||
NumPlayerTeam2 = 2,
|
NumPlayerTeam2 = 2,
|
||||||
NumFields = 9,
|
NumFields = 9,
|
||||||
|
NumJockers = 1,
|
||||||
ProfileIDsTeam1 = new List<Guid>(),
|
ProfileIDsTeam1 = new List<Guid>(),
|
||||||
ProfileIDsTeam2 = new List<Guid>(),
|
ProfileIDsTeam2 = new List<Guid>(),
|
||||||
CurrentRoundNr = 0,
|
CurrentRoundNr = 0,
|
||||||
@@ -395,25 +397,23 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
|
|
||||||
private void _SetNumJokers()
|
private void _SetNumJokers()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
GameData.NumJokerRandom[0] = GameData.NumJockers;
|
||||||
|
GameData.NumJokerRandom[1] = GameData.NumJockers;
|
||||||
|
|
||||||
switch (GameData.NumFields)
|
switch (GameData.NumFields)
|
||||||
{
|
{
|
||||||
case 9:
|
case 9:
|
||||||
GameData.NumJokerRandom[0] = 1;
|
|
||||||
GameData.NumJokerRandom[1] = 1;
|
|
||||||
GameData.NumJokerRetry[0] = 0;
|
GameData.NumJokerRetry[0] = 0;
|
||||||
GameData.NumJokerRetry[1] = 0;
|
GameData.NumJokerRetry[1] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
GameData.NumJokerRandom[0] = 2;
|
|
||||||
GameData.NumJokerRandom[1] = 2;
|
|
||||||
GameData.NumJokerRetry[0] = 1;
|
GameData.NumJokerRetry[0] = 1;
|
||||||
GameData.NumJokerRetry[1] = 1;
|
GameData.NumJokerRetry[1] = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 25:
|
case 25:
|
||||||
GameData.NumJokerRandom[0] = 3;
|
|
||||||
GameData.NumJokerRandom[1] = 3;
|
|
||||||
GameData.NumJokerRetry[0] = 2;
|
GameData.NumJokerRetry[0] = 2;
|
||||||
GameData.NumJokerRetry[1] = 2;
|
GameData.NumJokerRetry[1] = 2;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private const string _SelectSlideNumFields = "SelectSlideNumFields";
|
private const string _SelectSlideNumFields = "SelectSlideNumFields";
|
||||||
|
private const string _SelectSlideNumJockers = "SelectSlideNumJockers";
|
||||||
private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
|
private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
|
||||||
|
private const string _SelectSlideNumJokers = "SelectSlideNumJokers";
|
||||||
private const string _SelectSlideSwitchPlayer = "SelectSlideSwitchPlayer";
|
private const string _SelectSlideSwitchPlayer = "SelectSlideSwitchPlayer";
|
||||||
|
|
||||||
private const string _ButtonNext = "ButtonNext";
|
private const string _ButtonNext = "ButtonNext";
|
||||||
@@ -47,7 +49,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
_ThemeSelectSlides = new string[] { _SelectSlideNumFields };
|
_ThemeSelectSlides = new string[] { _SelectSlideNumFields, _SelectSlideNumJokers, _SelectSlideRefillJokers, _SelectSlideSwitchPlayer };
|
||||||
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
|
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,6 +134,14 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
|
|
||||||
_SelectSlides[_SelectSlideNumFields].SelectedTag = _PartyMode.GameData.NumFields;
|
_SelectSlides[_SelectSlideNumFields].SelectedTag = _PartyMode.GameData.NumFields;
|
||||||
|
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].Clear();
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].AddValue(0);
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].AddValue(1);
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].AddValue(2);
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].AddValue(3);
|
||||||
|
|
||||||
|
_SelectSlides[_SelectSlideNumJockers].SelectedTag = _PartyMode.GameData.NumJockers;
|
||||||
|
|
||||||
_SelectSlides[_SelectSlideRefillJokers].AddValues(Enum.GetNames(typeof(EOffOn)));
|
_SelectSlides[_SelectSlideRefillJokers].AddValues(Enum.GetNames(typeof(EOffOn)));
|
||||||
_SelectSlides[_SelectSlideRefillJokers].Selection = (int)_PartyMode.GameData.RefillJokers;
|
_SelectSlides[_SelectSlideRefillJokers].Selection = (int)_PartyMode.GameData.RefillJokers;
|
||||||
|
|
||||||
@@ -142,6 +152,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
private void _UpdateSlides()
|
private void _UpdateSlides()
|
||||||
{
|
{
|
||||||
_PartyMode.GameData.NumFields = _SelectSlides[_SelectSlideNumFields].SelectedTag;
|
_PartyMode.GameData.NumFields = _SelectSlides[_SelectSlideNumFields].SelectedTag;
|
||||||
|
_PartyMode.GameData.NumJockers = _SelectSlides[_SelectSlideNumJockers].Selection;
|
||||||
_PartyMode.GameData.RefillJokers = (EOffOn)_SelectSlides[_SelectSlideRefillJokers].Selection;
|
_PartyMode.GameData.RefillJokers = (EOffOn)_SelectSlides[_SelectSlideRefillJokers].Selection;
|
||||||
_PartyMode.GameData.SwitchPlayer = (EOffOn)_SelectSlides[_SelectSlideSwitchPlayer].Selection;
|
_PartyMode.GameData.SwitchPlayer = (EOffOn)_SelectSlides[_SelectSlideSwitchPlayer].Selection;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,6 +187,10 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
_UseJoker(0, 1);
|
_UseJoker(0, 1);
|
||||||
if (_Buttons[_ButtonJokerRetryT2].Selected)
|
if (_Buttons[_ButtonJokerRetryT2].Selected)
|
||||||
_UseJoker(1, 1);
|
_UseJoker(1, 1);
|
||||||
|
if (_Buttons[_ButtonSwitchPlayerT1].Selected)
|
||||||
|
_ChangePlayer(0, true);
|
||||||
|
if (_Buttons[_ButtonSwitchPlayerT2].Selected)
|
||||||
|
_ChangePlayer(1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user