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