Compare commits
No commits in common. "565ec07c65772f80420f3ffdb385da922764952f" and "81327043746023fd8a739060df8b5eddb456b40a" have entirely different histories.
565ec07c65
...
8132704374
@ -1756,7 +1756,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!136 &102349500
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8460,7 +8460,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0483b263e22fc433caab31141efbe319, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isDebugTest: 0
|
||||
isDebugTest: 1
|
||||
diceRollHandler: {fileID: 1013177415}
|
||||
diceValue: 0
|
||||
maxDiceSixRollCounter: 2
|
||||
@ -15149,7 +15149,6 @@ MonoBehaviour:
|
||||
- {fileID: 5608193482197189505}
|
||||
- {fileID: 5608193481571390227}
|
||||
baseObjects:
|
||||
- {fileID: 1949792867}
|
||||
- {fileID: 2095159703}
|
||||
- {fileID: 247469677}
|
||||
- {fileID: 875086323}
|
||||
@ -15158,6 +15157,7 @@ MonoBehaviour:
|
||||
- {fileID: 1954289399}
|
||||
- {fileID: 1107252688}
|
||||
- {fileID: 1406544794}
|
||||
- {fileID: 1949792867}
|
||||
- {fileID: 884011400}
|
||||
--- !u!4 &1335794571
|
||||
Transform:
|
||||
@ -20274,7 +20274,7 @@ AudioSource:
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
@ -24609,6 +24609,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
screenType: 6
|
||||
shouldFade: 0
|
||||
playBtn: {fileID: 0}
|
||||
closeBtn: {fileID: 0}
|
||||
--- !u!224 &5608193481924487018
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -60,9 +60,6 @@ public class MusicManager : MonoBehaviour, IBootLoader, IBase, IDataLoader
|
||||
|
||||
audioSource.priority = musicData.priority;
|
||||
audioSource.clip = musicData.musicClip;
|
||||
|
||||
if (audioSource.isPlaying) audioSource.Stop();
|
||||
|
||||
audioSource.Play();
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,18 +232,8 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
|
||||
Debug.Log($"playerGameData.playerType: {playerGameData.playerType}");
|
||||
|
||||
playerGameDatasDict.Add(
|
||||
playerGameData.playerType,
|
||||
new PlayerGameData
|
||||
{
|
||||
playerType = playerGameData.playerType,
|
||||
startIndex = playerGameData.startIndex,
|
||||
endIndex = playerGameData.endIndex,
|
||||
playersParent = playerGameData.playersParent,
|
||||
playerPawnsDict = new Dictionary<int, PlayerPawn>(),
|
||||
totalPawnsInHome = playerGameData.totalPawnsInHome,
|
||||
totalPawnsFinished = playerGameData.totalPawnsFinished
|
||||
});
|
||||
playerGameDatasDict.Add(playerGameData.playerType, playerGameData);
|
||||
playerGameDatasDict[playerGameData.playerType].playerPawnsDict = new Dictionary<int, PlayerPawn>();
|
||||
|
||||
foreach (Transform playerPawnChild in playerGameData.playersParent)
|
||||
{
|
||||
@ -252,7 +242,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
var pawn = playerPawnChild.GetComponent<PlayerPawn>();
|
||||
playerGameDatasDict[playerGameData.playerType].playerPawnsDict.Add(pawn.PlayerId, pawn);
|
||||
}
|
||||
|
||||
|
||||
playerGameDatasDict[playerGameData.playerType].totalPawnsInHome = playerGameDatasDict[playerGameData.playerType].playerPawnsDict.Count;
|
||||
}
|
||||
}
|
||||
@ -763,7 +753,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
|
||||
UpdateActivePlayersAndSetDisplay(false);
|
||||
Debug.Log($"after SwitchPlayer availPlayers: {availPlayers.Count}, playerPawn: {playerPawn}");
|
||||
Debug.Log($"after allPlayerTypes.Count: {allPlayerTypes.Count}");
|
||||
|
||||
if (allPlayerTypes.Count == 0)
|
||||
{
|
||||
@ -792,7 +781,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
UpdateActivePlayersAndSetDisplay(true);
|
||||
}
|
||||
|
||||
Debug.Log($"currentPlayerTurnIndex: {currentPlayerTurnIndex}");
|
||||
Debug.Log($"CurrentPlayerTurn: {currentPlayerTypeTurn}");
|
||||
SetCanRollDiceForUser(gameModeHandler.CurrentGameModeType != GameModeType.Bot || !botTypesInGame.Contains(currentPlayerTypeTurn));
|
||||
|
||||
@ -963,21 +951,17 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
{
|
||||
Tile tile = TilesManager.RetrieveFinishingTileBasedOnIndex(playerPawn.PlayerType, playerPawn.CurrentTileIndex);
|
||||
tile.InitPlayerPawn(playerPawn, playerPawn.PlayerType);
|
||||
// ShowUpdatedPlayerCountOnTile(playerPawn);
|
||||
ShowUpdatedPlayerCountOnTile(playerPawn);
|
||||
|
||||
UpdatePlayerState(playerPawn, PlayerState.HasFinished);
|
||||
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished++;
|
||||
|
||||
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished: {playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished}");
|
||||
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count: {playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count}");
|
||||
if (playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished == playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count)
|
||||
{
|
||||
CanRollDiceAgain = false;
|
||||
|
||||
var playerTypeToRemove = currentPlayerTypeTurn;
|
||||
allPlayerTypes.ForEach(type => Debug.Log($"before allPlayerTypes: {type}"));
|
||||
SwitchPlayer();
|
||||
allPlayerTypes.ForEach(type => Debug.Log($"after allPlayerTypes: {type}"));
|
||||
|
||||
if (allPlayerTypes.Contains(playerTypeToRemove))
|
||||
{
|
||||
|
||||
@ -11,7 +11,6 @@ public class GameManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
{
|
||||
private UIManager uiManager;
|
||||
private TilesManager tilesManager;
|
||||
private MusicManager musicManager;
|
||||
private GameplayManager gameplayManager;
|
||||
|
||||
public GameState GameState
|
||||
@ -31,7 +30,6 @@ public class GameManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
uiManager = InterfaceManager.Instance.GetInterfaceInstance<UIManager>();
|
||||
tilesManager = InterfaceManager.Instance.GetInterfaceInstance<TilesManager>();
|
||||
gameplayManager = InterfaceManager.Instance.GetInterfaceInstance<GameplayManager>();
|
||||
musicManager = InterfaceManager.Instance.GetInterfaceInstance<MusicManager>();
|
||||
|
||||
OnGameStateChanged(GameState.InMenu);
|
||||
}
|
||||
@ -44,16 +42,13 @@ public class GameManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
switch (gameState)
|
||||
{
|
||||
case GameState.InMenu:
|
||||
musicManager.PlayMusicClip(MusicType.HomeMusic);
|
||||
CheckPrevGameState();
|
||||
uiManager.OnInMenuScreen();
|
||||
break;
|
||||
case GameState.InGame:
|
||||
musicManager.PlayMusicClip(MusicType.GameMusic);
|
||||
uiManager.OnInGameScreen();
|
||||
break;
|
||||
case GameState.GameOver:
|
||||
musicManager.PlayMusicClip(MusicType.GameOverMusic);
|
||||
uiManager.OnGameOver();
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user