Compare commits
No commits in common. "45699adcc8ed8e76f568e9345954a738ffd5ee2f" and "253b5affc382fcf8466db8a13252bac8225899b3" have entirely different histories.
45699adcc8
...
253b5affc3
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB |
@ -1,147 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f6f7cf722ebaa46bdab456d7c3009064
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 12
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 0
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMasterTextureLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 1
|
|
||||||
wrapV: 1
|
|
||||||
wrapW: 0
|
|
||||||
nPOTScale: 0
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 1
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 1
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 8
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: iPhone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: WebGL
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID: 5e97eb03825dee720800000000000000
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable: {}
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -25,11 +25,10 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
transform.localPosition = new Vector3(0, 20, 0);
|
transform.localPosition = new Vector3(0, 20, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Roll(Action<int> onComplete, bool isBot)
|
public void Roll(Action<int> onComplete)
|
||||||
{
|
{
|
||||||
if (!rolling)
|
if (!rolling)
|
||||||
{
|
{
|
||||||
Debug.Log($"isBot: {isBot}");
|
|
||||||
onRollingComplete = onComplete;
|
onRollingComplete = onComplete;
|
||||||
StartCoroutine(RollRoutine());
|
StartCoroutine(RollRoutine());
|
||||||
}
|
}
|
||||||
@ -97,12 +96,5 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
rb.angularVelocity = Vector3.zero;
|
rb.angularVelocity = Vector3.zero;
|
||||||
transform.localPosition = new Vector3(0, 20, 0);
|
transform.localPosition = new Vector3(0, 20, 0);
|
||||||
rolling = false;
|
rolling = false;
|
||||||
|
|
||||||
Invoke(nameof(ResetEvent), 0.5f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ResetEvent()
|
|
||||||
{
|
|
||||||
onRollingComplete = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,15 +111,15 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 0.2
|
value: 0.14
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
||||||
propertyPath: m_LocalScale.y
|
propertyPath: m_LocalScale.y
|
||||||
value: 0.2
|
value: 0.14
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
||||||
propertyPath: m_LocalScale.z
|
propertyPath: m_LocalScale.z
|
||||||
value: 0.2
|
value: 0.14
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 5da822beb0d884a49a6333925f5142a8, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -96,6 +96,8 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
tilesManager = InterfaceManager.Instance.GetInterfaceInstance<TilesManager>();
|
tilesManager = InterfaceManager.Instance.GetInterfaceInstance<TilesManager>();
|
||||||
|
|
||||||
|
CanRollDiceForUser = true;
|
||||||
|
|
||||||
InitPlayerTypesForBotMatch(PlayerType.Player1, 3);
|
InitPlayerTypesForBotMatch(PlayerType.Player1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,8 +109,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
|
|
||||||
playerBaseHandler.InitPlayerTypes(allPlayerTypes);
|
playerBaseHandler.InitPlayerTypes(allPlayerTypes);
|
||||||
InitCurrentGamePlayerInfo();
|
InitCurrentGamePlayerInfo();
|
||||||
|
|
||||||
SetCanRollDiceForUser(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitPlayerTypesForBotMatch(PlayerType selectedPlayerType, int botCount)
|
public void InitPlayerTypesForBotMatch(PlayerType selectedPlayerType, int botCount)
|
||||||
@ -124,8 +124,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
InitCurrentGamePlayerInfo();
|
InitCurrentGamePlayerInfo();
|
||||||
InitBotRuntimeData();
|
InitBotRuntimeData();
|
||||||
AssignPlayerAndBotStates(selectedPlayerType);
|
AssignPlayerAndBotStates(selectedPlayerType);
|
||||||
|
|
||||||
SetCanRollDiceForUser(!botTypesInGame.Contains(selectedPlayerType));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitBotRuntimeData()
|
private void InitBotRuntimeData()
|
||||||
@ -246,6 +244,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
Debug.Log($"Switching player");
|
Debug.Log($"Switching player");
|
||||||
SwitchPlayer();
|
SwitchPlayer();
|
||||||
|
SetCanRollDiceForUser(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,11 +276,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
// What happens when you get a 6
|
// What happens when you get a 6
|
||||||
private void SelectPawnFromBotBase()
|
private void SelectPawnFromBotBase()
|
||||||
{
|
{
|
||||||
if (canSwitchPlayer || availPlayers.Count() < 1 && !CanRollDiceAgain || !botTypesInGame.Contains(currentPlayerTypeTurn))
|
if (canSwitchPlayer || availPlayers.Count() < 1 && !CanRollDiceAgain || !botTypesInGame.Contains(currentPlayerTypeTurn)) return; // Have a better check here
|
||||||
{
|
|
||||||
Debug.Log($"returning from SelectPawnFromBotBase");
|
|
||||||
return; // Have a better check here
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Log($"CallTest: SelectPawnFromBotBase: {currentPlayerTypeTurn}");
|
Debug.Log($"CallTest: SelectPawnFromBotBase: {currentPlayerTypeTurn}");
|
||||||
var botPawnsDictForCurrentPlayer = botRuntimeMovementData[currentPlayerTypeTurn]; // set the data inside this dict
|
var botPawnsDictForCurrentPlayer = botRuntimeMovementData[currentPlayerTypeTurn]; // set the data inside this dict
|
||||||
@ -457,7 +452,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
Debug.Log($"### AreAllPawnsInFinishingPath");
|
Debug.Log($"### AreAllPawnsInFinishingPath");
|
||||||
if (AreAllPawnsInFinishingPath())
|
if (AreAllPawnsInFinishingPath())
|
||||||
{
|
{
|
||||||
SetCanRollDiceForUser(!botTypesInGame.Contains(currentPlayerTypeTurn));
|
SetCanRollDiceForUser(true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -805,6 +800,10 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
SwitchPlayer(playerPawn);
|
SwitchPlayer(playerPawn);
|
||||||
|
if (!CanRollDiceAgain)
|
||||||
|
{
|
||||||
|
SetCanRollDiceForUser(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
index);
|
index);
|
||||||
@ -925,20 +924,21 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
CanRollDiceAgain = true;
|
CanRollDiceAgain = true;
|
||||||
if (playerPawn.IsBotPlayer)
|
if (playerPawn.IsBotPlayer)
|
||||||
CheckDiceRollForBot(playerPawn);
|
CheckDiceRollForBot(playerPawn);
|
||||||
else
|
|
||||||
SetCanRollDiceForUser(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CheckForMaxDiceRollAttempt())
|
if (CheckForMaxDiceRollAttempt())
|
||||||
{
|
{
|
||||||
|
SetCanRollDiceForUser(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchPlayer();
|
SwitchPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetCanRollDiceForUser(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
index);
|
index);
|
||||||
@ -946,7 +946,8 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
|
|
||||||
private void SetCanRollDiceForUser(bool state)
|
private void SetCanRollDiceForUser(bool state)
|
||||||
{
|
{
|
||||||
|
// if (botTypesInGame.Contains(playerType)) return;
|
||||||
|
|
||||||
CanRollDiceForUser = state;
|
CanRollDiceForUser = state;
|
||||||
Debug.Log($"CAnRollDiceForUser: {CanRollDiceForUser}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,11 +34,11 @@ public class DiceRollHandler : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (!inputManager.GameplayManager.CanRollDiceForUser) return;
|
if (!inputManager.GameplayManager.CanRollDiceForUser) return;
|
||||||
|
|
||||||
diceView.Roll(onComplete: (rolledVal) => OnUserDiceRollComplete(rolledVal), false);
|
diceView.Roll(onComplete: (rolledVal) => OnUserDiceRollComplete(rolledVal));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleDiceViewForBot(Action<int> onComplete)
|
public void HandleDiceViewForBot(Action<int> onComplete)
|
||||||
{
|
{
|
||||||
diceView.Roll(onComplete: (val) => onComplete?.Invoke(val), true);
|
diceView.Roll(onComplete: onComplete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,9 +157,7 @@ PlayerSettings:
|
|||||||
resetResolutionOnWindowResize: 0
|
resetResolutionOnWindowResize: 0
|
||||||
androidSupportedAspectRatio: 1
|
androidSupportedAspectRatio: 1
|
||||||
androidMaxAspectRatio: 2.1
|
androidMaxAspectRatio: 2.1
|
||||||
applicationIdentifier:
|
applicationIdentifier: {}
|
||||||
Android: com.DefaultCompany.Ludo3D
|
|
||||||
Standalone: com.DefaultCompany.Ludo-3D
|
|
||||||
buildNumber:
|
buildNumber:
|
||||||
Standalone: 0
|
Standalone: 0
|
||||||
iPhone: 0
|
iPhone: 0
|
||||||
@ -273,14 +271,7 @@ PlayerSettings:
|
|||||||
AndroidMinifyDebug: 0
|
AndroidMinifyDebug: 0
|
||||||
AndroidValidateAppBundleSize: 1
|
AndroidValidateAppBundleSize: 1
|
||||||
AndroidAppBundleSizeToValidate: 150
|
AndroidAppBundleSizeToValidate: 150
|
||||||
m_BuildTargetIcons:
|
m_BuildTargetIcons: []
|
||||||
- m_BuildTarget:
|
|
||||||
m_Icons:
|
|
||||||
- serializedVersion: 2
|
|
||||||
m_Icon: {fileID: 2800000, guid: f6f7cf722ebaa46bdab456d7c3009064, type: 3}
|
|
||||||
m_Width: 128
|
|
||||||
m_Height: 128
|
|
||||||
m_Kind: 0
|
|
||||||
m_BuildTargetPlatformIcons:
|
m_BuildTargetPlatformIcons:
|
||||||
- m_BuildTarget: iPhone
|
- m_BuildTarget: iPhone
|
||||||
m_Icons:
|
m_Icons:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user