Compare commits
No commits in common. "224c29f19d3fb549ee341ef399dd394c07a507f3" and "d2cfc4ad4aa33a67d6578693f6cde94784783d2e" have entirely different histories.
224c29f19d
...
d2cfc4ad4a
@ -238,7 +238,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
{
|
||||
Debug.Log($"Switching player");
|
||||
SwitchPlayer();
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(currentPlayerTypeTurn, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
|
||||
public void OnDiceRolled(int rolledVal)
|
||||
{
|
||||
SetCanRollDiceForUser(false);
|
||||
SetCanRollDiceForUser(currentPlayerTypeTurn, false);
|
||||
|
||||
// add core dice logic here
|
||||
Debug.Log($"Tile Index :: LUDO :: rolledVal: {rolledVal} :: {currentPlayerTypeTurn}");
|
||||
@ -449,7 +449,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
Debug.Log($"### AreAllPawnsInFinishingPath");
|
||||
if (AreAllPawnsInFinishingPath())
|
||||
{
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(currentPlayerTypeTurn, true);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -570,7 +570,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
if (playerPawn.IsBotPlayer)
|
||||
CheckDiceRollForBot(playerPawn);
|
||||
else
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(playerPawn.PlayerType, true);
|
||||
|
||||
}, playerGameData.startIndex);
|
||||
|
||||
@ -670,7 +670,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
diceText.text = $"{0}";
|
||||
}
|
||||
|
||||
SetCanRollDiceForUser(!botTypesInGame.Contains(currentPlayerTypeTurn));
|
||||
Debug.Log($"CurrentPlayerTurn: {currentPlayerTypeTurn}");
|
||||
var tempPos = playerBaseHandler.GetPlayerBase(currentPlayerTypeTurn).transform.position;
|
||||
pointerDebug.position = new Vector3(tempPos.x, 3f, tempPos.z);
|
||||
@ -772,7 +771,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
if (playerPawn.IsBotPlayer)
|
||||
CheckDiceRollForBot(playerPawn);
|
||||
else
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(playerPawn.PlayerType, true);
|
||||
}
|
||||
|
||||
nextTile.InitPlayerPawn(playerPawn, currentPlayerTypeTurn);
|
||||
@ -792,7 +791,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
SwitchPlayer(playerPawn);
|
||||
if (!CanRollDiceAgain)
|
||||
{
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(playerPawn.PlayerType, true);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -907,22 +906,22 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
{
|
||||
if (CheckForMaxDiceRollAttempt())
|
||||
{
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(playerPawn.PlayerType, true);
|
||||
return;
|
||||
}
|
||||
|
||||
SwitchPlayer();
|
||||
}
|
||||
|
||||
SetCanRollDiceForUser(true);
|
||||
SetCanRollDiceForUser(playerPawn.PlayerType, true);
|
||||
}
|
||||
},
|
||||
index);
|
||||
}
|
||||
|
||||
private void SetCanRollDiceForUser(bool state)
|
||||
private void SetCanRollDiceForUser(PlayerType playerType, bool state)
|
||||
{
|
||||
// if (botTypesInGame.Contains(playerType)) return;
|
||||
if (botTypesInGame.Contains(playerType)) return;
|
||||
|
||||
CanRollDice = state;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user