Compare commits
No commits in common. "9d6d2599e14a7e2a391b17906c46a9cebe81a2ad" and "afb05e4116fa422db488b5200d2a8635935d77a3" have entirely different histories.
9d6d2599e1
...
afb05e4116
@ -1,48 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8621343442563501342
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8621343442563501343}
|
||||
- component: {fileID: 8621343442563501340}
|
||||
m_Layer: 0
|
||||
m_Name: FinishingPathWaypoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8621343442563501343
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8621343442563501342}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.12, y: 0, z: -14.976}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8621343442563501340
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8621343442563501342}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: be69a8cfb3b2940308cbac570565e629, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isSafeZone: 0
|
||||
centeredPoint: {fileID: 8621343442563501343}
|
||||
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9f6f4c66b5a34d7eb7286e772505389
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -680,7 +680,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
tilesManager.GetFinishingTileDataLength(currentPlayerTypeTurn) - 1 : finishingPathIndex + diceRolledValue;
|
||||
|
||||
Debug.Log($"TargetIdx: {targetIdx}, finishingPathIndex: {finishingPathIndex}");
|
||||
DisplayPlayerCountOnTile(playerPawn, false);
|
||||
MoveThroughFinishingPath(playerPawn, finishingPathIndex, targetIdx);
|
||||
}
|
||||
|
||||
@ -933,8 +932,9 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
{
|
||||
UpdatePlayerState(playerPawn, PlayerState.InFinishingPath);
|
||||
|
||||
DisplayPlayerCountOnTile(playerPawn, false);
|
||||
playerPawn.MoveToTile(
|
||||
tilesManager.RetrieveFinishingTileBasedOnIndex(currentPlayerTypeTurn, index).transform.position,
|
||||
tilesManager.RetrievePositionForFinishingTile(currentPlayerTypeTurn, index).position,
|
||||
onComplete: () =>
|
||||
{
|
||||
diceRolledValue--;
|
||||
@ -1018,10 +1018,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
||||
|
||||
private void DisplayPlayerCountOnTile(PlayerPawn playerPawn, bool show)
|
||||
{
|
||||
Tile tile = playerPawn.GetPlayerState() == PlayerState.InFinishingPath ?
|
||||
tilesManager.RetrieveFinishingTileBasedOnIndex(playerPawn.PlayerType, playerPawn.CurrentTileIndex)
|
||||
: tilesManager.RetrieveTileBasedOnIndex(playerPawn.CurrentTileIndex);
|
||||
|
||||
Tile tile = tilesManager.RetrieveTileBasedOnIndex(playerPawn.CurrentTileIndex);
|
||||
Debug.Log($"Displaycount: {playerPawn.name} on tile: {tile.name}, show: {show}");
|
||||
playerPawn.ShowPlayerCountCanvas(show);
|
||||
if (!show) return;
|
||||
|
||||
@ -65,6 +65,7 @@ public class SafeTile : Tile
|
||||
placementQueue.Enqueue(playerTypesDict[playerType].commonPlacementTransform);
|
||||
playerTypesDict.Remove(playerType);
|
||||
Debug.Log($"targetSafeTile. tileName: {name} Removing player {playerType}");
|
||||
lastOccupiedIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,8 @@ public class Tile : MonoBehaviour
|
||||
|
||||
public Vector3 CenterPlacementPosition => centeredPoint.position;
|
||||
|
||||
protected int lastOccupiedIndex = 0;
|
||||
|
||||
private List<PlayerPawn> PlayerPawns = new List<PlayerPawn>(); // Change implementation
|
||||
|
||||
public bool HasPawnsAvailable => PlayerPawns.Count > 0;
|
||||
|
||||
@ -18,7 +18,7 @@ public class TilesManager : MonoBehaviour, IBootLoader, IDataLoader, IBase
|
||||
|
||||
private GameplayManager gameplayManager;
|
||||
|
||||
private Dictionary<PlayerType, List<Tile>> finishingTileDataPairs = new Dictionary<PlayerType, List<Tile>>();
|
||||
private Dictionary<PlayerType, List<Transform>> finishingTileDataPairs = new Dictionary<PlayerType, List<Transform>>();
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
@ -36,9 +36,9 @@ public class TilesManager : MonoBehaviour, IBootLoader, IDataLoader, IBase
|
||||
{
|
||||
if (gameplayManager.PlayerTypesCollection.Contains(tileData.playerType))
|
||||
{
|
||||
finishingTileDataPairs.Add(tileData.playerType, new List<Tile>());
|
||||
finishingTileDataPairs.Add(tileData.playerType, new List<Transform>());
|
||||
foreach (Transform child in tileData.playerFinishingTileParent)
|
||||
finishingTileDataPairs[tileData.playerType].Add(child.GetComponent<Tile>());
|
||||
finishingTileDataPairs[tileData.playerType].Add(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,13 +60,8 @@ public class TilesManager : MonoBehaviour, IBootLoader, IDataLoader, IBase
|
||||
return tile;
|
||||
}
|
||||
|
||||
public Tile RetrieveFinishingTileBasedOnIndex(PlayerType playerType, int index)
|
||||
public Transform RetrievePositionForFinishingTile(PlayerType playerType, int index)
|
||||
{
|
||||
return finishingTileDataPairs[playerType][index];
|
||||
}
|
||||
|
||||
public Transform RetrievePositionForFinishingTile(PlayerType playerType, int index)
|
||||
{
|
||||
return finishingTileDataPairs[playerType][index].transform;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user