diff --git a/Assets/Baby.prefab b/Assets/Baby.prefab index a4714e3..f09fb74 100644 --- a/Assets/Baby.prefab +++ b/Assets/Baby.prefab @@ -422,7 +422,7 @@ GameObject: - component: {fileID: 933390416532010} m_Layer: 0 m_Name: Baby - m_TagString: Untagged + m_TagString: Child m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -539,6 +539,7 @@ MonoBehaviour: faceObj: {fileID: 1577162025261597670} topObj: {fileID: 6588930193113420027} bottomObj: {fileID: 4834944236669872262} + m_RandomizeOnAwake: 0 --- !u!114 &933390416532010 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Parent.meta b/Assets/Parent.meta new file mode 100644 index 0000000..7bf10cc --- /dev/null +++ b/Assets/Parent.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86dea80417377514892dcb55caa8a561 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_angry.png b/Assets/Parent/parent_angry.png new file mode 100644 index 0000000..5b1c8f3 --- /dev/null +++ b/Assets/Parent/parent_angry.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a891fb7136c003006a3ab8428802fa55341b747efc117902472a05cc4560cc6 +size 8820 diff --git a/Assets/Parent/parent_angry.png.meta b/Assets/Parent/parent_angry.png.meta new file mode 100644 index 0000000..2d11385 --- /dev/null +++ b/Assets/Parent/parent_angry.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: b44a1ec83b8e25f4f84e7448636e0962 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_base1.png b/Assets/Parent/parent_base1.png new file mode 100644 index 0000000..c440ced --- /dev/null +++ b/Assets/Parent/parent_base1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:387b5c4d4a78847e0f70b5b36f68e0a6f66db3c93b15986a3157faa5a5f93ac2 +size 70755 diff --git a/Assets/Parent/parent_base1.png.meta b/Assets/Parent/parent_base1.png.meta new file mode 100644 index 0000000..99f5c7c --- /dev/null +++ b/Assets/Parent/parent_base1.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 217ec697db050644b86998d66e6d6080 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_base2.png b/Assets/Parent/parent_base2.png new file mode 100644 index 0000000..9925b33 --- /dev/null +++ b/Assets/Parent/parent_base2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fb4bfcccf00a4c1ba02e7c39a275aa2ed87ab06eec0e850c19b94aa86149482 +size 73647 diff --git a/Assets/Parent/parent_base2.png.meta b/Assets/Parent/parent_base2.png.meta new file mode 100644 index 0000000..3f78f42 --- /dev/null +++ b/Assets/Parent/parent_base2.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: b03e8399716300b45a98cdc1db74137a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_base3.png b/Assets/Parent/parent_base3.png new file mode 100644 index 0000000..5696321 --- /dev/null +++ b/Assets/Parent/parent_base3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7ba6d104689232c590e2ec61614e8b27b853cc8b288b04df06148e1bc267a79 +size 73224 diff --git a/Assets/Parent/parent_base3.png.meta b/Assets/Parent/parent_base3.png.meta new file mode 100644 index 0000000..62bad1e --- /dev/null +++ b/Assets/Parent/parent_base3.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: a4a26c3b282c3644a811bbf39e8ea40c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_happy1.png b/Assets/Parent/parent_happy1.png new file mode 100644 index 0000000..4d28fd7 --- /dev/null +++ b/Assets/Parent/parent_happy1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bd3183f2abbac68a3061a75ad3baee0e2e62ac8e95f23ee64a9fb59410ffb4e +size 11733 diff --git a/Assets/Parent/parent_happy1.png.meta b/Assets/Parent/parent_happy1.png.meta new file mode 100644 index 0000000..9a6baa1 --- /dev/null +++ b/Assets/Parent/parent_happy1.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 86deeb1e1aeed23468d8bce9f8646769 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_happy2.png b/Assets/Parent/parent_happy2.png new file mode 100644 index 0000000..d4bad7e --- /dev/null +++ b/Assets/Parent/parent_happy2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7f37be57b94060d0caf751b43ec9b2d98c1ea540bbc21ceb13c91f002e93a7b +size 12764 diff --git a/Assets/Parent/parent_happy2.png.meta b/Assets/Parent/parent_happy2.png.meta new file mode 100644 index 0000000..05a514c --- /dev/null +++ b/Assets/Parent/parent_happy2.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 3c7af6298f256af408046a1107b078ad +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_neutral.png b/Assets/Parent/parent_neutral.png new file mode 100644 index 0000000..5f648e6 --- /dev/null +++ b/Assets/Parent/parent_neutral.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cda796bee8aa7f8be5e93e9404e9cffa4e20cb6ea30f18e23d1e3fd188bfd041 +size 5424 diff --git a/Assets/Parent/parent_neutral.png.meta b/Assets/Parent/parent_neutral.png.meta new file mode 100644 index 0000000..9c792c1 --- /dev/null +++ b/Assets/Parent/parent_neutral.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: 5819a9fd766bfc840bd45455c763fff4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Parent/parent_talk.png b/Assets/Parent/parent_talk.png new file mode 100644 index 0000000..944c670 --- /dev/null +++ b/Assets/Parent/parent_talk.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85fe5796e1455bda799533a88891e8224cd737d7351941d2f1d89d770419713f +size 7560 diff --git a/Assets/Parent/parent_talk.png.meta b/Assets/Parent/parent_talk.png.meta new file mode 100644 index 0000000..0be0faa --- /dev/null +++ b/Assets/Parent/parent_talk.png.meta @@ -0,0 +1,142 @@ +fileFormatVersion: 2 +guid: f0b160dc85c5bbd458e716ec5082e7e9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ParentBehaviour.cs b/Assets/ParentBehaviour.cs index 839fffc..d7f4837 100644 --- a/Assets/ParentBehaviour.cs +++ b/Assets/ParentBehaviour.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.UI; public class ParentBehaviour : MonoBehaviour { @@ -31,8 +32,11 @@ public class ParentBehaviour : MonoBehaviour private void Start() { - parentBodyObj.GetComponent().material.mainTexture = parentBases[Random.Range(0, parentBases.Length)]; - parentFaceObj.GetComponent().material.mainTexture = parentFaceNeutral; + Texture _displayGraphic = parentBases[Random.Range(0, parentBases.Length)]; + parentBodyObj.GetComponent().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); + + _displayGraphic = parentFaceNeutral; + parentFaceObj.GetComponent().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); } [ContextMenu("Get Random Child")] @@ -45,13 +49,10 @@ public class ParentBehaviour : MonoBehaviour child = babySpawner.transform.GetChild(_childIndex).gameObject; - if (otherParent.child != null) + if (!ReferenceEquals(child, otherParent.child) || otherParent.child == null) { - if (child != otherParent.child) - { - //this prevents both parents asking for the same child - _validChild = true; - } + //this prevents both parents asking for the same child + _validChild = true; } } Randomizer _childRandomizer = child.GetComponent(); @@ -67,6 +68,8 @@ public class ParentBehaviour : MonoBehaviour order.Insert(Random.Range(0, order.Count), "eye"); order.Insert(Random.Range(0, order.Count), "top"); order.Insert(Random.Range(0, order.Count), "bottom"); + + GiveFirstDetail(); } public bool CheckChild(GameObject _child) @@ -83,36 +86,43 @@ public class ParentBehaviour : MonoBehaviour public Texture GiveDetails(GameObject _child) { + + for (int i = 0; i < order.Count; i++) { switch (order[i]){ case "base": - if (child.GetComponent().baseObj.GetComponent().material.mainTexture != baseVis) + if (_child.GetComponent().baseObj.GetComponent().material.mainTexture.name != baseVis.name) { + print("returning baseVis"); return baseVis; } break; case "hat": - if (child.GetComponent().hatObj.GetComponent().material.mainTexture != hatVis) + if (_child.GetComponent().hatObj.GetComponent().material.mainTexture.name != hatVis.name) { + print("returning hatVis"); return hatVis; } break; case "eye": - if (child.GetComponent().eyeObj.GetComponent().material.mainTexture != eyeVis) + if (_child.GetComponent().eyeObj.GetComponent().material.mainTexture.name != eyeVis.name) { + print("returning eyeVis"); return eyeVis; } break; case "top": - if (child.GetComponent().topObj.GetComponent().material.mainTexture != topVis) + if (_child.GetComponent().topObj.GetComponent().material.mainTexture.name != topVis.name) { + print("returning topVis"); return topVis; } break; case "bottom": - if (child.GetComponent().bottomObj.GetComponent().material.mainTexture != bottomVis) + if (_child.GetComponent().bottomObj.GetComponent().material.mainTexture.name != bottomVis.name) { + print("returning bottomVis"); return bottomVis; } break; @@ -123,21 +133,54 @@ public class ParentBehaviour : MonoBehaviour return null; } - private void OnTriggerEnter(Collider other) + public void GiveFirstDetail() { - if (other.gameObject.tag == "child") + Texture _displayGraphic; + switch (order[0]) { - if (CheckChild(other.gameObject)) - { - //this is the correct child - } - else + case "base": + _displayGraphic = baseVis; + break; + case "hat": + _displayGraphic = hatVis; + break; + case "eye": + _displayGraphic = eyeVis; + break; + case "top": + _displayGraphic = topVis; + break; + case "bottom": + _displayGraphic = bottomVis; + break; + default: + _displayGraphic = null; + break; + } + parentDialougeObj.GetComponent().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); + } + + private void OnCollisionEnter(Collision collision) + { + if (child != null) + { + if (collision.collider.gameObject.tag == "Child") { - Texture _displayGraphic = GiveDetails(other.gameObject); - //display the display graphic - parentDialougeObj.GetComponent().material.mainTexture = _displayGraphic; + if (CheckChild(collision.collider.gameObject)) + { + print("correct child"); + //this is the correct child + } + else + { + Texture _displayGraphic = GiveDetails(collision.collider.gameObject); + //display the display graphic + parentDialougeObj.GetComponent().sprite = Sprite.Create((Texture2D)_displayGraphic, new Rect(0.0f, 0.0f, _displayGraphic.width, _displayGraphic.height), new Vector2(0.5f, 0.5f), 100.0f); + + //yeet child back to centre of room + //child = collision.collider.gameObject + } } } } - } diff --git a/Assets/Scenes/CreditScreen.unity b/Assets/Scenes/CreditScreen.unity new file mode 100644 index 0000000..9547f94 --- /dev/null +++ b/Assets/Scenes/CreditScreen.unity @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45cbb35f73bef260e35c7801bca1014fc73152ebf848d768c861f34392e8c4ae +size 43062 diff --git a/Assets/Scenes/CreditScreen.unity.meta b/Assets/Scenes/CreditScreen.unity.meta new file mode 100644 index 0000000..11dba3d --- /dev/null +++ b/Assets/Scenes/CreditScreen.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a85bd4296d5a1684fa42dc31c88b08d4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/MainGameplayScene.unity b/Assets/Scenes/MainGameplayScene.unity index 30a44b4..66a508e 100644 --- a/Assets/Scenes/MainGameplayScene.unity +++ b/Assets/Scenes/MainGameplayScene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cff5435899d1eccf8fbba0724eed7fbf71d4920bbf35bd4168af93cb0918d851 -size 657501 +oid sha256:5d191edf558d0b55b1ae30476a4683fb7472518babdcee2b55a20cd972372616 +size 719035 diff --git a/Assets/Scenes/PlayerJoinScene.unity b/Assets/Scenes/PlayerJoinScene.unity index 3410be3..c6718f0 100644 --- a/Assets/Scenes/PlayerJoinScene.unity +++ b/Assets/Scenes/PlayerJoinScene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50ef57180cb7e056bf7a20f27eada4434bdd64e9bb7120f0509ba56cdfd503e1 -size 40595 +oid sha256:253030a0b0592237197a0b0a2ca583ad5935a8a545a476cbd3d2aaa3d6931f9e +size 40672 diff --git a/Assets/Scripts/Player Scripts/PlayerData.cs b/Assets/Scripts/Player Scripts/PlayerData.cs index 58c6dc8..9418449 100644 --- a/Assets/Scripts/Player Scripts/PlayerData.cs +++ b/Assets/Scripts/Player Scripts/PlayerData.cs @@ -10,6 +10,9 @@ public class PlayerData : ScriptableObject public uint ID { get; private set; } public Color Color { get; private set; } + + public int Score; + public UnityEngine.InputSystem.PlayerInput Input { get; private set; } public static PlayerData Initialise(uint ID, Color color, UnityEngine.InputSystem.PlayerInput input) diff --git a/Assets/Scripts/Player Scripts/PlayerList.cs b/Assets/Scripts/Player Scripts/PlayerList.cs index 388544b..3abf563 100644 --- a/Assets/Scripts/Player Scripts/PlayerList.cs +++ b/Assets/Scripts/Player Scripts/PlayerList.cs @@ -30,10 +30,14 @@ public class PlayerList : ScriptableObject PlayerData data = PlayerData.Initialise(ID, color, input); + data.Score = Random.Range(2, 10); + Players.Add(input, data); OnPlayerJoin?.Invoke(this,data); + + return data; } diff --git a/Assets/Scripts/UI/CreditScreen.meta b/Assets/Scripts/UI/CreditScreen.meta new file mode 100644 index 0000000..0ce3ce3 --- /dev/null +++ b/Assets/Scripts/UI/CreditScreen.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f0d43d896ffeafd41a94c6952b8193e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/CreditScreen/CreditUIController.cs b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs new file mode 100644 index 0000000..621c822 --- /dev/null +++ b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs @@ -0,0 +1,133 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +public class CreditUIController : MonoBehaviour +{ + + [SerializeField] + private PlayerList m_allPlayers; + + [SerializeField] + private GameObject m_playerPrefab; + + [SerializeField] + private RectTransform winnerPos; + [SerializeField] + private RectTransform losePos; + + [SerializeField] + private float waitTime = 1; + + [SerializeField] + private float creditDisplayTime = 1; + + [SerializeField] + public List m_CreditReferences; + + [SerializeField] + public List m_Credits; + + private int Count; + + + private void Start() + { + StartCoroutine(DisplaySlow(waitTime)); + StartCoroutine(DisplayCredits(creditDisplayTime)); + } + + [ContextMenu("display All players")] + private void DisplayAllPlayers() + { + int max = m_allPlayers.AllPlayers.Select(p => p.Score).Max(); + int min = m_allPlayers.AllPlayers.Select(p => p.Score).Min(); + + foreach (var data in m_allPlayers.AllPlayers) + { + DisplayScore(data, max, min); + } + } + + + private IEnumerator DisplaySlow(float timebetween = 1) + { + int max = m_allPlayers.AllPlayers.Select(p => p.Score).Max(); + int min = m_allPlayers.AllPlayers.Select(p => p.Score).Min(); + + foreach (var data in m_allPlayers.AllPlayers.OrderBy(p => p.Score)) + { + yield return new WaitForSeconds(timebetween); + DisplayScore(data, max, min); + } + } + + private IEnumerator DisplayCredits(float displayTime) + { + + float totalTime = displayTime / m_CreditReferences.Count; + + + while (true) + { + CreditReferences reference = m_CreditReferences[Count%m_CreditReferences.Count]; + CreditData data = m_Credits[Count % m_Credits.Count]; + Count++; + + reference.Title.text = data.Title; + reference.Credit.text = data.Credit; + + yield return new WaitForSeconds(totalTime); + } + } + + + private void DisplayScore(PlayerData player, int maxScore, int minScore) + { + + player.Input.SwitchCurrentActionMap("JoinMenu"); + + float ratio = 0.5f; + if (maxScore != minScore) + ratio = (float)(player.Score - minScore) / (maxScore - minScore); + + Vector3 pos = Vector3.Lerp(losePos.position, winnerPos.position, ratio); + pos.x = Random.Range((Screen.width / 4f), Screen.width); + + GameObject newPlayer = Instantiate(m_playerPrefab); + newPlayer.transform.parent = (m_playerPrefab.transform.parent); + + newPlayer.transform.position = pos; + newPlayer.transform.Rotate(Vector3.forward, Random.Range(-20.0f, 20.0f)); + + if (Random.Range(0, 2) > 0) + { + newPlayer.transform.localScale.Scale(new Vector3(-1, 1, 1)); + newPlayer.GetComponentInChildren().transform.localScale.Scale(new Vector3(-1, 1, 1)); + } + + + + newPlayer.GetComponent().Initialise(player); + newPlayer.GetComponentInChildren().text = player.Score.ToString(); + + newPlayer.SetActive(true); + } + + [System.Serializable] + public struct CreditReferences + { + public TMPro.TextMeshProUGUI Title; + public TMPro.TextMeshProUGUI Credit; + } + + + [System.Serializable] + public struct CreditData + { + public string Title; + public string Credit; + } + +} diff --git a/Assets/Scripts/UI/CreditScreen/CreditUIController.cs.meta b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs.meta new file mode 100644 index 0000000..08000d0 --- /dev/null +++ b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc723bcaa734e8646a99f2415e540ff0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs b/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs index b4dcf67..e004bba 100644 --- a/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs +++ b/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs @@ -27,6 +27,15 @@ public class PlayerJoinIcon : MonoBehaviour } + private void OnDisable() + { + if (m_data != null) + { + m_data.Input.currentActionMap.FindAction("Ping").started -= OnPlayerPing; + m_data.Input.currentActionMap.FindAction("Ping").canceled -= OnPlayerPing; + } + } + public void Initialise(PlayerData data) { Debug.Log("Initialised new Player"); diff --git a/Assets/Scripts/spawner.cs b/Assets/Scripts/spawner.cs index 81d8872..59886c4 100644 --- a/Assets/Scripts/spawner.cs +++ b/Assets/Scripts/spawner.cs @@ -10,6 +10,8 @@ public class spawner : MonoBehaviour private Dictionary babyCombos = new Dictionary(); + public Collider[] spawnVolumes; + void Start() { for (int x = 0; x < startingAmount; x++) @@ -20,10 +22,11 @@ public class spawner : MonoBehaviour public void SpawnBaby() { - float _x = Random.Range(-45, 45); - float _z = Random.Range(-35, 35); + Vector3 _spawnPoint = RandomPointInBounds(spawnVolumes[Random.Range(0, spawnVolumes.Length)].bounds); + + _spawnPoint.y = 2.5f; - var _newChild = Instantiate(childPrefab, new Vector3(_x, 1.5f, _z), Quaternion.identity); + var _newChild = Instantiate(childPrefab, _spawnPoint, Quaternion.identity); _newChild.transform.parent = this.transform; Randomizer _randomizer = _newChild.GetComponent(); @@ -50,4 +53,13 @@ public class spawner : MonoBehaviour } } } + + public static Vector3 RandomPointInBounds(Bounds bounds) + { + return new Vector3( + Random.Range(bounds.min.x, bounds.max.x), + Random.Range(bounds.min.y, bounds.max.y), + Random.Range(bounds.min.z, bounds.max.z) + ); + } } diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat index cca8ce8..33b7221 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat @@ -32,8 +32,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, - type: 2} + m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OutlineTex: @@ -50,6 +49,7 @@ Material: - _BumpFace: 0 - _BumpOutline: 0 - _ColorMask: 15 + - _CullMode: 0 - _Diffuse: 0.5 - _FaceDilate: 0.1 - _FaceUVSpeedX: 0 @@ -65,7 +65,7 @@ Material: - _OutlineSoftness: 0 - _OutlineUVSpeedX: 0 - _OutlineUVSpeedY: 0 - - _OutlineWidth: 0.1 + - _OutlineWidth: 0.343 - _PerspectiveFilter: 0.875 - _Reflectivity: 10 - _ScaleRatioA: 0.9 @@ -102,3 +102,4 @@ Material: - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Assets/World Assets/Materials/Score_Text.mat b/Assets/World Assets/Materials/Score_Text.mat new file mode 100644 index 0000000..fc445c1 --- /dev/null +++ b/Assets/World Assets/Materials/Score_Text.mat @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Score_Text + m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _ColorMask: 15 + - _Cull: 2 + - _CullMode: 0 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _FaceDilate: 0 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _GradientScale: 5 + - _MaskSoftnessX: 0 + - _MaskSoftnessY: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _OutlineSoftness: 0 + - _OutlineWidth: 0 + - _PerspectiveFilter: 0.875 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _ScaleRatioA: 1 + - _ScaleRatioB: 1 + - _ScaleRatioC: 1 + - _ScaleX: 1 + - _ScaleY: 1 + - _ShaderFlags: 0 + - _Sharpness: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Surface: 0 + - _TextureHeight: 512 + - _TextureWidth: 512 + - _UnderlayDilate: 0 + - _UnderlayOffsetX: 0 + - _UnderlayOffsetY: 0 + - _UnderlaySoftness: 0 + - _VertexOffsetX: 0 + - _VertexOffsetY: 0 + - _WeightBold: 0.5 + - _WeightNormal: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FaceColor: {r: 1, g: 1, b: 1, a: 1} + - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} + m_BuildTextureStacks: [] +--- !u!114 &3715928537810302973 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 2 diff --git a/Assets/World Assets/Materials/Score_Text.mat.meta b/Assets/World Assets/Materials/Score_Text.mat.meta new file mode 100644 index 0000000..c434a24 --- /dev/null +++ b/Assets/World Assets/Materials/Score_Text.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a67ea2466379b44f913e57a770b8d35 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 2676c4a..b3cfec0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edd4fcab3ab45f6bd4bbc4193ce3e12e36123e183ac011a15afb24b3f70433e5 -size 569 +oid sha256:0a68e17c72ce703e0218008d0b23a6efad1cd6c5705c84197ce94a0f88f1022f +size 670 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 655645a..5ec2a9f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6863636cef68eb4932202bae7fe8100a3b515e5abd4b8b312ee200f2be9406b3 -size 19478 +oid sha256:cfa00f978614a8162ec54ba46c54081ce759eaa79f92f6111fbb91b6e04ae1eb +size 19462 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 8d0fed2..690c0a7 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9234e7ac4d5cd6d4d21b26fbbb2530b754e87a147df38e852bf774ccf5179b44 -size 421 +oid sha256:9bf979d6c314282e8e3171a0c8f54c6c0a192f5ac641d3b5b40106b81127c3e3 +size 385