Compare commits
No commits in common. "2cebaa46a9f0805aaa0352d63bb42c2d502499e5" and "0814fce7afcce6a5c705fd5456c808b52db28876" have entirely different histories.
2cebaa46a9
...
0814fce7af
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4061e8aa84dfe4eb2a50f6ca6cd2de8a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 154 KiB |
@ -1,147 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 390d47ba6df534413b44212f4f3e46ab
|
|
||||||
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: WebGL
|
|
||||||
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
|
|
||||||
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:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 164 KiB |
@ -1,147 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b319e1c209cba4553984a082f038f4d3
|
|
||||||
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: WebGL
|
|
||||||
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
|
|
||||||
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:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB |
@ -1,147 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a1fb635e62b0b41d5b7bef83dab5b737
|
|
||||||
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: WebGL
|
|
||||||
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
|
|
||||||
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:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 178 KiB |
@ -1,147 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: badd09bdd1cad4e869f5a86093eb9100
|
|
||||||
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: WebGL
|
|
||||||
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
|
|
||||||
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:
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!91 &9100000
|
|
||||||
AnimatorController:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: Dice View
|
|
||||||
serializedVersion: 5
|
|
||||||
m_AnimatorParameters: []
|
|
||||||
m_AnimatorLayers: []
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fc151435589cf4a46ae3e2dc20aa6378
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 9100000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 281 KiB |
@ -1,280 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: bbe0ebcb7b6854733a0dd63492c4d57d
|
|
||||||
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: 2
|
|
||||||
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: WebGL
|
|
||||||
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
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites:
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_0
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 112
|
|
||||||
y: 378
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: 1c51d9a8a1fe1413c8c957a757094949
|
|
||||||
internalID: -1704993586
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_2
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 112
|
|
||||||
y: 669
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: 51577d2c759f24aa78f10850058c42fa
|
|
||||||
internalID: -446861723
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_3
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 406
|
|
||||||
y: 378
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: b7d249b4ca3684517a5c30d8595af541
|
|
||||||
internalID: -1410956897
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_4
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 406
|
|
||||||
y: 669
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: e483cbda05166422fa2b83e73ebf5461
|
|
||||||
internalID: -216994016
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_5
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 406
|
|
||||||
y: 87
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: a79736ce389b84e249d8cfbd84c2a865
|
|
||||||
internalID: -387705599
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Dice_6
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 112
|
|
||||||
y: 87
|
|
||||||
width: 325
|
|
||||||
height: 325
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0.5, y: 0.5}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: b7a58afd4739a454ab8934ce5c6cd7cc
|
|
||||||
internalID: -1712661324
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID: bd1add5ef440642049506ef9345ecac5
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable:
|
|
||||||
Dice_0: -1704993586
|
|
||||||
Dice_1: -241868573
|
|
||||||
Dice_2: -446861723
|
|
||||||
Dice_3: -1410956897
|
|
||||||
Dice_4: -216994016
|
|
||||||
Dice_5: -387705599
|
|
||||||
Dice_6: -1712661324
|
|
||||||
spritePackingTag:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
pSDShowRemoveMatteOption: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!74 &7400000
|
|
||||||
AnimationClip:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: DiceRoll_anim
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Legacy: 0
|
|
||||||
m_Compressed: 0
|
|
||||||
m_UseHighQualityCurve: 1
|
|
||||||
m_RotationCurves: []
|
|
||||||
m_CompressedRotationCurves: []
|
|
||||||
m_EulerCurves: []
|
|
||||||
m_PositionCurves: []
|
|
||||||
m_ScaleCurves: []
|
|
||||||
m_FloatCurves: []
|
|
||||||
m_PPtrCurves: []
|
|
||||||
m_SampleRate: 60
|
|
||||||
m_WrapMode: 0
|
|
||||||
m_Bounds:
|
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
|
||||||
m_Extent: {x: 0, y: 0, z: 0}
|
|
||||||
m_ClipBindingConstant:
|
|
||||||
genericBindings: []
|
|
||||||
pptrCurveMapping: []
|
|
||||||
m_AnimationClipSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
|
||||||
m_AdditiveReferencePoseTime: 0
|
|
||||||
m_StartTime: 0
|
|
||||||
m_StopTime: 1
|
|
||||||
m_OrientationOffsetY: 0
|
|
||||||
m_Level: 0
|
|
||||||
m_CycleOffset: 0
|
|
||||||
m_HasAdditiveReferencePose: 0
|
|
||||||
m_LoopTime: 1
|
|
||||||
m_LoopBlend: 0
|
|
||||||
m_LoopBlendOrientation: 0
|
|
||||||
m_LoopBlendPositionY: 0
|
|
||||||
m_LoopBlendPositionXZ: 0
|
|
||||||
m_KeepOriginalOrientation: 0
|
|
||||||
m_KeepOriginalPositionY: 1
|
|
||||||
m_KeepOriginalPositionXZ: 0
|
|
||||||
m_HeightFromFeet: 0
|
|
||||||
m_Mirror: 0
|
|
||||||
m_EditorCurves: []
|
|
||||||
m_EulerEditorCurves: []
|
|
||||||
m_HasGenericRootTransform: 0
|
|
||||||
m_HasMotionFloatCurves: 0
|
|
||||||
m_Events: []
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 56866b3f3aa684c4aaae327d408408f5
|
|
||||||
NativeFormatImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
mainObjectFileID: 7400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
|
||||||
|
|
||||||
public class DiceView : MonoBehaviour, IBase
|
public class DiceView : MonoBehaviour, IBase
|
||||||
{
|
{
|
||||||
@ -18,14 +16,10 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
[SerializeField] private float sideForce = 0.18f;
|
[SerializeField] private float sideForce = 0.18f;
|
||||||
[SerializeField] private float liftForce = 0.1f;
|
[SerializeField] private float liftForce = 0.1f;
|
||||||
|
|
||||||
private List<int> probabilityValues = new List<int>() { 3, 4, 5 };
|
|
||||||
private Quaternion startRotation;
|
private Quaternion startRotation;
|
||||||
private Action<int> onRollingComplete = null;
|
private Action<int> onRollingComplete = null;
|
||||||
|
|
||||||
private IRollBase rollBase = null;
|
|
||||||
private bool hasNoActionOnRoll = false;
|
|
||||||
|
|
||||||
private void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
rb = GetComponent<Rigidbody>();
|
rb = GetComponent<Rigidbody>();
|
||||||
rb.useGravity = false;
|
rb.useGravity = false;
|
||||||
@ -45,31 +39,31 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator RollRoutine()
|
IEnumerator RollRoutine()
|
||||||
{
|
{
|
||||||
rolling = true;
|
rolling = true;
|
||||||
|
|
||||||
// MICRO DELAY → breaks physics sync between dice
|
// MICRO DELAY → breaks physics sync between dice
|
||||||
yield return new WaitForSeconds(Random.Range(0.01f, 0.06f));
|
yield return new WaitForSeconds(UnityEngine.Random.Range(0.01f, 0.06f));
|
||||||
|
|
||||||
rb.useGravity = true;
|
rb.useGravity = true;
|
||||||
|
|
||||||
// PER-DICE FORCE MULTIPLIER
|
// PER-DICE FORCE MULTIPLIER
|
||||||
float spinMultiplier = Random.Range(0.8f, 1.25f);
|
float spinMultiplier = UnityEngine.Random.Range(0.8f, 1.25f);
|
||||||
|
|
||||||
// RANDOM TORQUE
|
// RANDOM TORQUE
|
||||||
rb.AddTorque(
|
rb.AddTorque(
|
||||||
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
UnityEngine.Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
||||||
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
UnityEngine.Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
||||||
Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
UnityEngine.Random.Range(-baseSpinForce, baseSpinForce) * spinMultiplier,
|
||||||
ForceMode.Impulse
|
ForceMode.Impulse
|
||||||
);
|
);
|
||||||
|
|
||||||
// RANDOM SIDE FORCE
|
// RANDOM SIDE FORCE
|
||||||
Vector3 sideDir = new Vector3(
|
Vector3 sideDir = new Vector3(
|
||||||
Random.Range(-1f, 1f),
|
UnityEngine.Random.Range(-1f, 1f),
|
||||||
0f,
|
0f,
|
||||||
Random.Range(-1f, 1f)
|
UnityEngine.Random.Range(-1f, 1f)
|
||||||
).normalized;
|
).normalized;
|
||||||
|
|
||||||
rb.AddForce(sideDir * sideForce, ForceMode.Impulse);
|
rb.AddForce(sideDir * sideForce, ForceMode.Impulse);
|
||||||
@ -79,44 +73,28 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
|
|
||||||
yield return new WaitForSeconds(sideValueTime);
|
yield return new WaitForSeconds(sideValueTime);
|
||||||
|
|
||||||
int rolledVal = 0;
|
int value = GetDiceValue();
|
||||||
if (hasNoActionOnRoll)
|
|
||||||
{
|
//TODO: Use the dice value as needed
|
||||||
if (rollBase.SixRollCount == 0)
|
Debug.Log($"Dice rolled: {value}");
|
||||||
{
|
|
||||||
rollBase.UpdateMaxRollCount(probabilityValues[Random.Range(0, probabilityValues.Count)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
rollBase.UpdateSixRollCount();
|
|
||||||
rolledVal = rollBase.SixRollCount == rollBase.MaxRollCount ?
|
|
||||||
Ludo_3D_Constants.Max_Dice_Rolls : GetDiceValue();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rolledVal = GetDiceValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rolledVal == Ludo_3D_Constants.Max_Dice_Rolls)
|
|
||||||
ResetRollData();
|
|
||||||
|
|
||||||
ResetDice();
|
ResetDice();
|
||||||
Debug.Log($"Dice rolled: {rolledVal}");
|
onRollingComplete?.Invoke(value);
|
||||||
onRollingComplete?.Invoke(rolledVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int GetDiceValue()
|
|
||||||
{
|
|
||||||
return Random.Range(1, Ludo_3D_Constants.Max_Dice_Rolls + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetRollData()
|
int GetDiceValue()
|
||||||
{
|
{
|
||||||
if (rollBase != null) rollBase.ResetRollData();
|
foreach (DiceSide side in diceSides)
|
||||||
|
{
|
||||||
|
if (side.OnGround())
|
||||||
|
return side.sideValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetDice()
|
public void ResetDice()
|
||||||
{
|
{
|
||||||
rollBase = null;
|
|
||||||
rb.useGravity = false;
|
rb.useGravity = false;
|
||||||
rb.velocity = Vector3.zero;
|
rb.velocity = Vector3.zero;
|
||||||
rb.angularVelocity = Vector3.zero;
|
rb.angularVelocity = Vector3.zero;
|
||||||
@ -130,13 +108,4 @@ public class DiceView : MonoBehaviour, IBase
|
|||||||
transform.localRotation = startRotation;
|
transform.localRotation = startRotation;
|
||||||
onRollingComplete = null;
|
onRollingComplete = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitOnNoActionsAfterRoll(IRollBase rollBase, bool state)
|
|
||||||
{
|
|
||||||
hasNoActionOnRoll = state;
|
|
||||||
if (!state)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.rollBase = rollBase;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,222 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &770534144500286122
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 4547155689416384467}
|
|
||||||
- component: {fileID: 8636401148931874773}
|
|
||||||
- component: {fileID: 3592825875980183606}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Dice
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &4547155689416384467
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 770534144500286122}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 1
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 1882416428171655664}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &8636401148931874773
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 770534144500286122}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &3592825875980183606
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 770534144500286122}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 0}
|
|
||||||
m_Type: 0
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 1
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!1 &1882416428171655665
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1882416428171655664}
|
|
||||||
- component: {fileID: 1882416428171655662}
|
|
||||||
- component: {fileID: 1882416428171655663}
|
|
||||||
- component: {fileID: 1882416428171655661}
|
|
||||||
- component: {fileID: 3198670228222659179}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Dice View
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1882416428171655664
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1882416428171655665}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children:
|
|
||||||
- {fileID: 4547155689416384467}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 100, y: -100}
|
|
||||||
m_SizeDelta: {x: 120, y: 120}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &1882416428171655662
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1882416428171655665}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &1882416428171655663
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1882416428171655665}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 58e0f18b9561a4018b66e3973548335b, type: 3}
|
|
||||||
m_Type: 0
|
|
||||||
m_PreserveAspect: 1
|
|
||||||
m_FillCenter: 1
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!114 &1882416428171655661
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1882416428171655665}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Navigation:
|
|
||||||
m_Mode: 3
|
|
||||||
m_WrapAround: 0
|
|
||||||
m_SelectOnUp: {fileID: 0}
|
|
||||||
m_SelectOnDown: {fileID: 0}
|
|
||||||
m_SelectOnLeft: {fileID: 0}
|
|
||||||
m_SelectOnRight: {fileID: 0}
|
|
||||||
m_Transition: 1
|
|
||||||
m_Colors:
|
|
||||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
|
||||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
|
||||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
|
||||||
m_ColorMultiplier: 1
|
|
||||||
m_FadeDuration: 0.1
|
|
||||||
m_SpriteState:
|
|
||||||
m_HighlightedSprite: {fileID: 0}
|
|
||||||
m_PressedSprite: {fileID: 0}
|
|
||||||
m_SelectedSprite: {fileID: 0}
|
|
||||||
m_DisabledSprite: {fileID: 0}
|
|
||||||
m_AnimationTriggers:
|
|
||||||
m_NormalTrigger: Normal
|
|
||||||
m_HighlightedTrigger: Highlighted
|
|
||||||
m_PressedTrigger: Pressed
|
|
||||||
m_SelectedTrigger: Selected
|
|
||||||
m_DisabledTrigger: Disabled
|
|
||||||
m_Interactable: 1
|
|
||||||
m_TargetGraphic: {fileID: 1882416428171655663}
|
|
||||||
m_OnClick:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
--- !u!95 &3198670228222659179
|
|
||||||
Animator:
|
|
||||||
serializedVersion: 5
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1882416428171655665}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Avatar: {fileID: 0}
|
|
||||||
m_Controller: {fileID: 9100000, guid: fc151435589cf4a46ae3e2dc20aa6378, type: 2}
|
|
||||||
m_CullingMode: 0
|
|
||||||
m_UpdateMode: 0
|
|
||||||
m_ApplyRootMotion: 0
|
|
||||||
m_LinearVelocityBlending: 0
|
|
||||||
m_StabilizeFeet: 0
|
|
||||||
m_WarningMessage:
|
|
||||||
m_HasTransformHierarchy: 1
|
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
|
||||||
m_KeepAnimatorStateOnDisable: 0
|
|
||||||
m_WriteDefaultValuesOnDisable: 0
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 94fc731c540da43c9ab09386da3501df
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -8476,28 +8476,24 @@ MonoBehaviour:
|
|||||||
playersParent: {fileID: 1373272158}
|
playersParent: {fileID: 1373272158}
|
||||||
totalPawnsInHome: 0
|
totalPawnsInHome: 0
|
||||||
totalPawnsFinished: 0
|
totalPawnsFinished: 0
|
||||||
totalPawnsInFinishingPath: 0
|
|
||||||
- playerType: 1
|
- playerType: 1
|
||||||
startIndex: 13
|
startIndex: 13
|
||||||
endIndex: 11
|
endIndex: 11
|
||||||
playersParent: {fileID: 1841959051}
|
playersParent: {fileID: 1841959051}
|
||||||
totalPawnsInHome: 0
|
totalPawnsInHome: 0
|
||||||
totalPawnsFinished: 0
|
totalPawnsFinished: 0
|
||||||
totalPawnsInFinishingPath: 0
|
|
||||||
- playerType: 2
|
- playerType: 2
|
||||||
startIndex: 26
|
startIndex: 26
|
||||||
endIndex: 24
|
endIndex: 24
|
||||||
playersParent: {fileID: 1934858463}
|
playersParent: {fileID: 1934858463}
|
||||||
totalPawnsInHome: 0
|
totalPawnsInHome: 0
|
||||||
totalPawnsFinished: 0
|
totalPawnsFinished: 0
|
||||||
totalPawnsInFinishingPath: 0
|
|
||||||
- playerType: 3
|
- playerType: 3
|
||||||
startIndex: 39
|
startIndex: 39
|
||||||
endIndex: 37
|
endIndex: 37
|
||||||
playersParent: {fileID: 1094154913}
|
playersParent: {fileID: 1094154913}
|
||||||
totalPawnsInHome: 0
|
totalPawnsInHome: 0
|
||||||
totalPawnsFinished: 0
|
totalPawnsFinished: 0
|
||||||
totalPawnsInFinishingPath: 0
|
|
||||||
playerBaseHandler: {fileID: 433034051}
|
playerBaseHandler: {fileID: 433034051}
|
||||||
--- !u!4 &896294589 stripped
|
--- !u!4 &896294589 stripped
|
||||||
Transform:
|
Transform:
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 05273ddf992ca4671b13f0b4b9dde85d
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
public interface IRollBase
|
|
||||||
{
|
|
||||||
public int SixRollCount { get; }
|
|
||||||
|
|
||||||
public int MaxRollCount { get; }
|
|
||||||
|
|
||||||
void UpdateSixRollCount();
|
|
||||||
void UpdateMaxRollCount(int val);
|
|
||||||
void ResetRollData();
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4683cbbafe11541cf8a71cdd12df62ac
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -76,7 +76,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
private bool CanRollDiceAgain = false; // used for when you get a 6 or when you reach the finish point
|
private bool CanRollDiceAgain = false; // used for when you get a 6 or when you reach the finish point
|
||||||
private int diceSixRollCounter = 0;
|
private int diceSixRollCounter = 0;
|
||||||
|
|
||||||
private List<PlayerPawn> availPlayersToMove = new List<PlayerPawn>();
|
private List<PlayerPawn> availPlayers = new List<PlayerPawn>();
|
||||||
private bool canSwitchPlayer = true;
|
private bool canSwitchPlayer = true;
|
||||||
|
|
||||||
public bool CanRollDiceForUser
|
public bool CanRollDiceForUser
|
||||||
@ -169,7 +169,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
|
|
||||||
private void HandleDiceRollWithDelay()
|
private void HandleDiceRollWithDelay()
|
||||||
{
|
{
|
||||||
Invoke(nameof(RollDiceForBot), botDiceRollDelay);
|
Invoke(nameof(HandleDiceRoll), botDiceRollDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitBotRuntimeData()
|
private void InitBotRuntimeData()
|
||||||
@ -267,7 +267,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
currentPlayerTurnTimer.Init(currentPlayerTurnMaxTime, onComplete: () =>
|
currentPlayerTurnTimer.Init(currentPlayerTurnMaxTime, onComplete: () =>
|
||||||
{
|
{
|
||||||
Debug.Log($"currentPlayerTurnTimer: HandleDiceViewForUser");
|
Debug.Log($"currentPlayerTurnTimer: HandleDiceViewForUser");
|
||||||
RollDiceForUser();
|
diceRollHandler.HandleDiceViewForUser();
|
||||||
}, inProgress: (remTime) =>
|
}, inProgress: (remTime) =>
|
||||||
{
|
{
|
||||||
uIManager.UpdatePlayerTurnText(currentPlayerTypeTurn, currentPlayerTurnMaxTime - (int)remTime);
|
uIManager.UpdatePlayerTurnText(currentPlayerTypeTurn, currentPlayerTurnMaxTime - (int)remTime);
|
||||||
@ -349,7 +349,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
public void OnDiceInteracted()
|
public void OnDiceInteracted()
|
||||||
{
|
{
|
||||||
ResetCurrentPlayerTurnTimer();
|
ResetCurrentPlayerTurnTimer();
|
||||||
RollDiceForUser();
|
diceRollHandler.HandleDiceViewForUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RollDiceForPlayer(int rolledVal)
|
public void RollDiceForPlayer(int rolledVal)
|
||||||
@ -396,7 +396,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 || availPlayersToMove.Count() < 1 && !CanRollDiceAgain || !botTypesInGame.Contains(currentPlayerTypeTurn))
|
if (canSwitchPlayer || availPlayers.Count() < 1 && !CanRollDiceAgain || !botTypesInGame.Contains(currentPlayerTypeTurn))
|
||||||
{
|
{
|
||||||
Debug.Log($"returning from SelectPawnFromBotBase");
|
Debug.Log($"returning from SelectPawnFromBotBase");
|
||||||
return; // Have a better check here
|
return; // Have a better check here
|
||||||
@ -408,7 +408,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
int savedPlayerId = -1;
|
int savedPlayerId = -1;
|
||||||
PlayerPawn pawn = null;
|
PlayerPawn pawn = null;
|
||||||
|
|
||||||
Debug.Log($"SelectPawnFromBotBase: availPlayers.Count(): {availPlayersToMove.Count()}, CanRollDiceAgain: {CanRollDiceAgain}");
|
Debug.Log($"SelectPawnFromBotBase: availPlayers.Count(): {availPlayers.Count()}, CanRollDiceAgain: {CanRollDiceAgain}");
|
||||||
|
|
||||||
if (playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInHome == 0)
|
if (playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInHome == 0)
|
||||||
{
|
{
|
||||||
@ -428,7 +428,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"Before Iterating");
|
Debug.Log($"Before Iterating");
|
||||||
foreach (var playerPawn in availPlayersToMove)
|
foreach (var playerPawn in availPlayers)
|
||||||
{
|
{
|
||||||
int possibleSteps = 0;
|
int possibleSteps = 0;
|
||||||
Tile possibleTileData = null;
|
Tile possibleTileData = null;
|
||||||
@ -515,7 +515,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CanRollDiceAgain)
|
if (CanRollDiceAgain)
|
||||||
RollDiceForBot();
|
HandleDiceRoll();
|
||||||
else
|
else
|
||||||
SwitchPlayer();
|
SwitchPlayer();
|
||||||
}
|
}
|
||||||
@ -570,8 +570,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
return possibleSteps > TilesManager.GetGeneralTilesLength() - 1;
|
return possibleSteps > TilesManager.GetGeneralTilesLength() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HasNoPlayersTravelling() => Mathf.Abs(availPlayersToMove.Count - playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInFinishingPath) < 1;
|
|
||||||
|
|
||||||
public void OnDiceRolled(int rolledVal)
|
public void OnDiceRolled(int rolledVal)
|
||||||
{
|
{
|
||||||
SetCanRollDiceForUser(false);
|
SetCanRollDiceForUser(false);
|
||||||
@ -580,10 +578,15 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
Debug.Log($"Tile Index :: LUDO :: rolledVal: {rolledVal} :: {currentPlayerTypeTurn}");
|
Debug.Log($"Tile Index :: LUDO :: rolledVal: {rolledVal} :: {currentPlayerTypeTurn}");
|
||||||
diceRolledValue = rolledVal;
|
diceRolledValue = rolledVal;
|
||||||
diceText.text = $"{diceRolledValue}";
|
diceText.text = $"{diceRolledValue}";
|
||||||
|
availPlayers = new List<PlayerPawn>();
|
||||||
|
|
||||||
if (!CanRollDiceAgain)
|
if (!CanRollDiceAgain)
|
||||||
{
|
{
|
||||||
SetDisplayCountForAllAvailPlayers(true);
|
UpdateActivePlayersAndSetDisplay(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InitActivePlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rolledVal == Ludo_3D_Constants.Max_Dice_Rolls)
|
if (rolledVal == Ludo_3D_Constants.Max_Dice_Rolls)
|
||||||
@ -593,25 +596,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
// also play a simple animation before selecting
|
// also play a simple animation before selecting
|
||||||
CanRollDiceAgain = true;
|
CanRollDiceAgain = true;
|
||||||
diceSixRollCounter++;
|
diceSixRollCounter++;
|
||||||
|
|
||||||
if (botTypesInGame != null && !botTypesInGame.Contains(currentPlayerTypeTurn))
|
|
||||||
{
|
|
||||||
if (availPlayersToMove.Count < 1 || HasNoPlayersTravelling())
|
|
||||||
{
|
|
||||||
if (playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInHome > 0)
|
|
||||||
{
|
|
||||||
OnPawnSelected(playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Values
|
|
||||||
.FirstOrDefault(pawn => pawn.GetPlayerState() == PlayerState.InHome));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInHome < 1 && CanMoveSoloPlayer())
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
pointerMeshRend.material = selectMat;
|
pointerMeshRend.material = selectMat;
|
||||||
#endif
|
#endif
|
||||||
@ -628,75 +612,56 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"### EnablePlayerSelectionStates");
|
Debug.Log($"### EnablePlayerSelectionStates");
|
||||||
|
|
||||||
EnablePlayerSelectionStates(true);
|
EnablePlayerSelectionStates(true);
|
||||||
|
|
||||||
// pointerMeshRend.materials[0] = selectMat;
|
// pointerMeshRend.materials[0] = selectMat;
|
||||||
}
|
}
|
||||||
else // if there are any other pawns that are in safe or moving state
|
else // if there are any other pawns that are in safe or moving state
|
||||||
{
|
{
|
||||||
Debug.Log($"before CustomAvailablePlayers: {availPlayersToMove.Count}");
|
// for player's logic
|
||||||
|
|
||||||
|
int customAvailPlayers = availPlayers.Count();
|
||||||
|
Debug.Log($"before CustomAvailablePlayers: {customAvailPlayers}");
|
||||||
List<int> indexesToRemove = new List<int>();
|
List<int> indexesToRemove = new List<int>();
|
||||||
|
|
||||||
for (int i = 0; i < availPlayersToMove.Count; i++)
|
for (int i = 0; i < availPlayers.Count; i++)
|
||||||
{
|
{
|
||||||
Debug.Log($"## playerPawn.GetPlayerState(): {availPlayersToMove[i].GetPlayerState()}");
|
Debug.Log($"## playerPawn.GetPlayerState(): {availPlayers[i].GetPlayerState()}");
|
||||||
|
|
||||||
if (availPlayersToMove[i].GetPlayerState() == PlayerState.InFinishingPath)
|
if (availPlayers[i].GetPlayerState() == PlayerState.InFinishingPath)
|
||||||
{
|
{
|
||||||
Debug.Log($"diceRolledValue: {diceRolledValue}, FinishingDataLen: {TilesManager.GetFinishingTileDataLength(currentPlayerTypeTurn)}, playerPawn.CurrentTileIndex: {availPlayersToMove[i].CurrentTileIndex}");
|
Debug.Log($"diceRolledValue: {diceRolledValue}, FinishingDataLen: {TilesManager.GetFinishingTileDataLength(currentPlayerTypeTurn)}, playerPawn.CurrentTileIndex: {availPlayers[i].CurrentTileIndex}");
|
||||||
if (diceRolledValue <= TilesManager.GetFinishingTileDataLength(currentPlayerTypeTurn) - (availPlayersToMove[i].CurrentTileIndex + 1))
|
if (diceRolledValue <= TilesManager.GetFinishingTileDataLength(currentPlayerTypeTurn) - (availPlayers[i].CurrentTileIndex + 1))
|
||||||
{
|
{
|
||||||
availPlayersToMove[i].SetPlayerSelectionState(true);
|
availPlayers[i].SetPlayerSelectionState(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
indexesToRemove.Add(i);
|
indexesToRemove.Add(i);
|
||||||
availPlayersToMove[i].SetPlayerSelectionState(false);
|
availPlayers[i].SetPlayerSelectionState(false);
|
||||||
availPlayersToMove[i].ShowPlayerCountCanvas(false);
|
availPlayers[i].ShowPlayerCountCanvas(false);
|
||||||
|
customAvailPlayers--;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
availPlayersToMove[i].SetPlayerSelectionState(true);
|
availPlayers[i].SetPlayerSelectionState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int idx = indexesToRemove.Count - 1; idx >= 0; idx--)
|
for (int idx = indexesToRemove.Count - 1; idx >= 0; idx--)
|
||||||
availPlayersToMove.RemoveAt(idx);
|
availPlayers.RemoveAt(idx);
|
||||||
|
|
||||||
Debug.Log($"CustomAvailablePlayers: {availPlayersToMove.Count}");
|
// if (availPlayers.Count() < 1)
|
||||||
canSwitchPlayer = availPlayersToMove.Count < 1;
|
Debug.Log($"CustomAvailablePlayers: {customAvailPlayers}");
|
||||||
|
canSwitchPlayer = customAvailPlayers < 1;
|
||||||
CanRollDiceAgain = false;
|
CanRollDiceAgain = false;
|
||||||
|
|
||||||
if (botTypesInGame != null && !botTypesInGame.Contains(currentPlayerTypeTurn) &&
|
|
||||||
availPlayersToMove.Count > 0)
|
|
||||||
{
|
|
||||||
if (CanMoveSoloPlayer())
|
|
||||||
{
|
|
||||||
EnablePlayerSelectionStates(false);
|
|
||||||
OnPawnSelected(availPlayersToMove[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"CanRollDiceAgain: {CanRollDiceAgain}, canSwitchPlayer: {canSwitchPlayer}");
|
Debug.Log($"CanRollDiceAgain: {CanRollDiceAgain}, canSwitchPlayer: {canSwitchPlayer}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanMoveSoloPlayer()
|
|
||||||
{
|
|
||||||
if (availPlayersToMove.Count == 1)
|
|
||||||
{
|
|
||||||
if (availPlayersToMove[0].GetPlayerState() == PlayerState.InSafeZone || availPlayersToMove[0].GetPlayerState() == PlayerState.Moving
|
|
||||||
|| availPlayersToMove[0].GetPlayerState() == PlayerState.InFinishingPath)
|
|
||||||
{
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateActivePlayersAndSetDisplay(bool state)
|
private void UpdateActivePlayersAndSetDisplay(bool state)
|
||||||
{
|
{
|
||||||
InitActivePlayers();
|
InitActivePlayers();
|
||||||
@ -705,8 +670,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
|
|
||||||
private void InitActivePlayers()
|
private void InitActivePlayers()
|
||||||
{
|
{
|
||||||
availPlayersToMove = new List<PlayerPawn>();
|
availPlayers = playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Values.Select(pawn => pawn)
|
||||||
availPlayersToMove = playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Values.Select(pawn => pawn)
|
|
||||||
.Where(pawn => pawn.GetPlayerState() == PlayerState.InSafeZone ||
|
.Where(pawn => pawn.GetPlayerState() == PlayerState.InSafeZone ||
|
||||||
pawn.GetPlayerState() == PlayerState.Moving ||
|
pawn.GetPlayerState() == PlayerState.Moving ||
|
||||||
pawn.GetPlayerState() == PlayerState.InFinishingPath).ToList();
|
pawn.GetPlayerState() == PlayerState.InFinishingPath).ToList();
|
||||||
@ -744,48 +708,16 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
if (CanRollDiceAgain)
|
if (CanRollDiceAgain)
|
||||||
{
|
{
|
||||||
RollDiceForBot();
|
HandleDiceRoll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RollDiceForUser()
|
private void HandleDiceRoll()
|
||||||
{
|
|
||||||
InitActivePlayers();
|
|
||||||
bool canUsePawnsFromHome = CanUsePawnsFromHome();
|
|
||||||
diceRollHandler.HandleDiceViewForUser(
|
|
||||||
hasNoActionOnRoll: canUsePawnsFromHome,
|
|
||||||
playerBase: canUsePawnsFromHome ? PlayerBaseHandler.GetPlayerBase(currentPlayerTypeTurn) : null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RollDiceForBot()
|
|
||||||
{
|
|
||||||
InitActivePlayers();
|
|
||||||
HandleDiceRollForBot();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***
|
|
||||||
* Summary:
|
|
||||||
* Scenario where the user/bot has no other move when some of the pawns/characters out of home
|
|
||||||
* are in finishing path and doesn't have a move from dice rolled value
|
|
||||||
*/
|
|
||||||
private bool CanUsePawnsFromHome()
|
|
||||||
{
|
|
||||||
return playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInHome > 0 && HasNoPlayersTravelling();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleDiceRollForBot()
|
|
||||||
{
|
{
|
||||||
if (isDebugAITest)
|
if (isDebugAITest)
|
||||||
diceRollHandler.HandleDiceViewForBot((rollVal) => RollDiceForBot(rollVal),
|
diceRollHandler.HandleDiceViewForBot((rollVal) => RollDiceForBot(rollVal), diceValue == 0 ? UnityEngine.Random.Range(1, Ludo_3D_Constants.Max_Dice_Rolls + 1) : diceValue);
|
||||||
diceValue == 0 ? UnityEngine.Random.Range(1, Ludo_3D_Constants.Max_Dice_Rolls + 1) : diceValue);
|
else
|
||||||
else
|
diceRollHandler.HandleDiceViewForBot((rollVal) => RollDiceForBot(rollVal));
|
||||||
{
|
|
||||||
bool canUsePawnsFromHome = CanUsePawnsFromHome();
|
|
||||||
diceRollHandler.HandleDiceViewForBot(
|
|
||||||
(rollVal) => RollDiceForBot(rollVal),
|
|
||||||
hasNoActionOnRoll: canUsePawnsFromHome,
|
|
||||||
playerBase: canUsePawnsFromHome ? PlayerBaseHandler.GetPlayerBase(currentPlayerTypeTurn) : null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPawnSelected(PlayerPawn selectedPawn)
|
public void OnPawnSelected(PlayerPawn selectedPawn)
|
||||||
@ -838,7 +770,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
else if (selectedPawn.CurrentTileIndex == playerGameDatasDict[currentPlayerTypeTurn].endIndex)
|
else if (selectedPawn.CurrentTileIndex == playerGameDatasDict[currentPlayerTypeTurn].endIndex)
|
||||||
{
|
{
|
||||||
TilesManager.RetrieveTileBasedOnIndex(selectedPawn.CurrentTileIndex).ResetPlayerPawn(selectedPawn);
|
TilesManager.RetrieveTileBasedOnIndex(selectedPawn.CurrentTileIndex).ResetPlayerPawn(selectedPawn);
|
||||||
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInFinishingPath++;
|
|
||||||
ApplyFinishingPathLogic(selectedPawn);
|
ApplyFinishingPathLogic(selectedPawn);
|
||||||
}
|
}
|
||||||
else if (selectedPawn.GetPlayerState() == PlayerState.InSafeZone || selectedPawn.GetPlayerState() == PlayerState.Moving)
|
else if (selectedPawn.GetPlayerState() == PlayerState.InSafeZone || selectedPawn.GetPlayerState() == PlayerState.Moving)
|
||||||
@ -912,10 +843,10 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
Debug.Log($"currentPlayerTurn: {currentPlayerTypeTurn}");
|
Debug.Log($"currentPlayerTurn: {currentPlayerTypeTurn}");
|
||||||
Debug.Log($"currentPlayerTurnIndex: {currentPlayerTurnIndex}");
|
Debug.Log($"currentPlayerTurnIndex: {currentPlayerTurnIndex}");
|
||||||
|
|
||||||
Debug.Log($"before SwitchPlayer availPlayers: {availPlayersToMove.Count}, playerPawn: {playerPawn}");
|
Debug.Log($"before SwitchPlayer availPlayers: {availPlayers.Count}, playerPawn: {playerPawn}");
|
||||||
|
|
||||||
UpdateActivePlayersAndSetDisplay(false);
|
UpdateActivePlayersAndSetDisplay(false);
|
||||||
Debug.Log($"after SwitchPlayer availPlayers: {availPlayersToMove.Count}, playerPawn: {playerPawn}");
|
Debug.Log($"after SwitchPlayer availPlayers: {availPlayers.Count}, playerPawn: {playerPawn}");
|
||||||
Debug.Log($"after allPlayerTypes.Count: {allPlayerTypes.Count}");
|
Debug.Log($"after allPlayerTypes.Count: {allPlayerTypes.Count}");
|
||||||
|
|
||||||
if (allPlayerTypes.Count == 0)
|
if (allPlayerTypes.Count == 0)
|
||||||
@ -975,11 +906,11 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
availPlayersToMove.ForEach(pawn => ShowUpdatedPlayerCountOnTile(pawn));
|
availPlayers.ForEach(pawn => ShowUpdatedPlayerCountOnTile(pawn));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
availPlayersToMove.ForEach(pawn => pawn.ShowPlayerCountCanvas(false));
|
availPlayers.ForEach(pawn => pawn.ShowPlayerCountCanvas(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1017,9 +948,6 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
{
|
{
|
||||||
// MoveThroughTiles(playerPawn, index, targetIndex);
|
// MoveThroughTiles(playerPawn, index, targetIndex);
|
||||||
Debug.Log($"TargetIdx: {targetIndex - index}");
|
Debug.Log($"TargetIdx: {targetIndex - index}");
|
||||||
if (index == playerGameDatasDict[currentPlayerTypeTurn].endIndex)
|
|
||||||
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInFinishingPath++;
|
|
||||||
|
|
||||||
CheckForGamePause(() => MoveThroughFinishingPath(playerPawn, 0, targetIndex - index));
|
CheckForGamePause(() => MoveThroughFinishingPath(playerPawn, 0, targetIndex - index));
|
||||||
}
|
}
|
||||||
else if (nextTileIndex <= targetIndex)
|
else if (nextTileIndex <= targetIndex)
|
||||||
@ -1137,9 +1065,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
// ShowUpdatedPlayerCountOnTile(playerPawn);
|
// ShowUpdatedPlayerCountOnTile(playerPawn);
|
||||||
|
|
||||||
UpdatePlayerState(playerPawn, PlayerState.HasFinished);
|
UpdatePlayerState(playerPawn, PlayerState.HasFinished);
|
||||||
|
|
||||||
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished++;
|
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished++;
|
||||||
playerGameDatasDict[currentPlayerTypeTurn].totalPawnsInFinishingPath--;
|
|
||||||
|
|
||||||
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished: {playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished}");
|
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished: {playerGameDatasDict[currentPlayerTypeTurn].totalPawnsFinished}");
|
||||||
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count: {playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count}");
|
Debug.Log($"playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count: {playerGameDatasDict[currentPlayerTypeTurn].playerPawnsDict.Count}");
|
||||||
@ -1259,7 +1185,7 @@ public class GameplayManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
|
|||||||
|
|
||||||
playerGameDatasDict = null;
|
playerGameDatasDict = null;
|
||||||
playerDatas = null;
|
playerDatas = null;
|
||||||
availPlayersToMove = null;
|
availPlayers = null;
|
||||||
|
|
||||||
botTypesInGame = null;
|
botTypesInGame = null;
|
||||||
botRuntimeMovementData = null;
|
botRuntimeMovementData = null;
|
||||||
|
|||||||
@ -7,17 +7,12 @@ public class BasePlacementData
|
|||||||
public Transform placementTransform;
|
public Transform placementTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlayerBase : MonoBehaviour, IRollBase
|
public class PlayerBase : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private PlayerType playerType;
|
[SerializeField] private PlayerType playerType;
|
||||||
[SerializeField] private BasePlacementData[] basePlacementDatas;
|
[SerializeField] private BasePlacementData[] basePlacementDatas;
|
||||||
[SerializeField] private PlayerPawn[] playerPawns;
|
[SerializeField] private PlayerPawn[] playerPawns;
|
||||||
[SerializeField] private GameObject playerBaseEffect;
|
[SerializeField] private GameObject playerBaseEffect;
|
||||||
|
|
||||||
private int sixRollCount, maxRollCount;
|
|
||||||
|
|
||||||
public int SixRollCount => sixRollCount;
|
|
||||||
public int MaxRollCount => maxRollCount;
|
|
||||||
|
|
||||||
public bool IsBotBase
|
public bool IsBotBase
|
||||||
{
|
{
|
||||||
@ -26,22 +21,6 @@ public class PlayerBase : MonoBehaviour, IRollBase
|
|||||||
|
|
||||||
public PlayerType GetPlayerType() => playerType;
|
public PlayerType GetPlayerType() => playerType;
|
||||||
|
|
||||||
public void UpdateSixRollCount()
|
|
||||||
{
|
|
||||||
sixRollCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ResetRollData()
|
|
||||||
{
|
|
||||||
sixRollCount = 0;
|
|
||||||
maxRollCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateMaxRollCount(int val)
|
|
||||||
{
|
|
||||||
maxRollCount = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitPlayerData()
|
public void InitPlayerData()
|
||||||
{
|
{
|
||||||
for (int idx = 0; idx < basePlacementDatas.Length; idx++)
|
for (int idx = 0; idx < basePlacementDatas.Length; idx++)
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class PlayerBaseData
|
public class PlayerBaseData
|
||||||
|
|||||||
@ -27,7 +27,6 @@ public class PlayerGameData
|
|||||||
public Dictionary<int, PlayerPawn> playerPawnsDict;
|
public Dictionary<int, PlayerPawn> playerPawnsDict;
|
||||||
public int totalPawnsInHome = 0;
|
public int totalPawnsInHome = 0;
|
||||||
public int totalPawnsFinished = 0;
|
public int totalPawnsFinished = 0;
|
||||||
public int totalPawnsInFinishingPath = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public class DiceRollHandler : MonoBehaviour
|
|||||||
inputManager.SetDiceRollValue(rolledVal);
|
inputManager.SetDiceRollValue(rolledVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleDiceViewForUser(bool hasNoActionOnRoll = false, PlayerBase playerBase = null)
|
public void HandleDiceViewForUser()
|
||||||
{
|
{
|
||||||
if (!inputManager.GameplayManager.CanRollDiceForUser) return;
|
if (!inputManager.GameplayManager.CanRollDiceForUser) return;
|
||||||
|
|
||||||
@ -39,17 +39,11 @@ public class DiceRollHandler : MonoBehaviour
|
|||||||
if (inputManager.GameplayManager.IsDebugPlayerTest)
|
if (inputManager.GameplayManager.IsDebugPlayerTest)
|
||||||
OnUserDiceRollComplete(GetDiceTestVal());
|
OnUserDiceRollComplete(GetDiceTestVal());
|
||||||
else
|
else
|
||||||
{
|
diceView.Roll(onComplete: (rolledVal) => OnUserDiceRollComplete(rolledVal), false);
|
||||||
diceView.InitOnNoActionsAfterRoll(playerBase, hasNoActionOnRoll);
|
|
||||||
diceView.Roll(
|
|
||||||
(rolledVal) => OnUserDiceRollComplete(rolledVal),
|
|
||||||
false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleDiceViewForBot(Action<int> onComplete, bool hasNoActionOnRoll = false, PlayerBase playerBase = null)
|
public void HandleDiceViewForBot(Action<int> onComplete)
|
||||||
{
|
{
|
||||||
diceView.InitOnNoActionsAfterRoll(playerBase, hasNoActionOnRoll);
|
|
||||||
diceView.Roll(onComplete: onComplete, true);
|
diceView.Roll(onComplete: onComplete, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user