diff --git a/Assets/Art/Materials.meta b/Assets/Art/Materials.meta new file mode 100644 index 0000000..605c9f2 --- /dev/null +++ b/Assets/Art/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0c92cbcd5d0adc142b47082933b10684 +folderAsset: yes +timeCreated: 1440263099 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/Materials/T_Lit_Cadre_D.mat b/Assets/Art/Materials/T_Lit_Cadre_D.mat new file mode 100644 index 0000000..d7c5796 Binary files /dev/null and b/Assets/Art/Materials/T_Lit_Cadre_D.mat differ diff --git a/Assets/Art/Materials/T_Lit_Cadre_D.mat.meta b/Assets/Art/Materials/T_Lit_Cadre_D.mat.meta new file mode 100644 index 0000000..a9c088d --- /dev/null +++ b/Assets/Art/Materials/T_Lit_Cadre_D.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69d3bb142e9e6064083dc07f4eb8a2e8 +timeCreated: 1440263099 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/Materials/T_Lit_Drap01_D.mat b/Assets/Art/Materials/T_Lit_Drap01_D.mat new file mode 100644 index 0000000..9397069 Binary files /dev/null and b/Assets/Art/Materials/T_Lit_Drap01_D.mat differ diff --git a/Assets/Art/Materials/T_Lit_Drap01_D.mat.meta b/Assets/Art/Materials/T_Lit_Drap01_D.mat.meta new file mode 100644 index 0000000..680e81b --- /dev/null +++ b/Assets/Art/Materials/T_Lit_Drap01_D.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d9580703c7aa24d46af0b69d32797918 +timeCreated: 1440263100 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/Materials/T_Lit_Matelas_D.mat b/Assets/Art/Materials/T_Lit_Matelas_D.mat new file mode 100644 index 0000000..1a0b2c9 Binary files /dev/null and b/Assets/Art/Materials/T_Lit_Matelas_D.mat differ diff --git a/Assets/Art/Materials/T_Lit_Matelas_D.mat.meta b/Assets/Art/Materials/T_Lit_Matelas_D.mat.meta new file mode 100644 index 0000000..afaf698 --- /dev/null +++ b/Assets/Art/Materials/T_Lit_Matelas_D.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d40c7a9a950ef943b7b5d50a03e8c4e +timeCreated: 1440263099 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/SM_Lit.FBX b/Assets/Art/SM_Lit.FBX new file mode 100644 index 0000000..b8fa136 Binary files /dev/null and b/Assets/Art/SM_Lit.FBX differ diff --git a/Assets/Art/SM_Lit.FBX.meta b/Assets/Art/SM_Lit.FBX.meta new file mode 100644 index 0000000..4d4e250 --- /dev/null +++ b/Assets/Art/SM_Lit.FBX.meta @@ -0,0 +1,86 @@ +fileFormatVersion: 2 +guid: c363f2ebb3b0dd940b930163386af1f5 +timeCreated: 1440263100 +licenseType: Free +ModelImporter: + serializedVersion: 18 + fileIDToRecycleName: + 100000: Object002 + 100002: Object003 + 100004: Object004 + 100006: //RootNode + 400000: Object002 + 400002: Object003 + 400004: Object004 + 400006: //RootNode + 2300000: Object002 + 2300002: Object003 + 2300004: Object004 + 3300000: Object002 + 3300002: Object003 + 3300004: Object004 + 4300000: Object002 + 4300002: Object003 + 4300004: Object004 + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/SM_Lit.fbm.meta b/Assets/Art/SM_Lit.fbm.meta new file mode 100644 index 0000000..9d6b006 --- /dev/null +++ b/Assets/Art/SM_Lit.fbm.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8ca9f475852ccb84783c150fd0200c1e +folderAsset: yes +timeCreated: 1440263098 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga b/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga new file mode 100644 index 0000000..aa1f4d4 Binary files /dev/null and b/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga differ diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga.meta b/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga.meta new file mode 100644 index 0000000..6b6d112 --- /dev/null +++ b/Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 245bd740bec1a1e41b460cb7c1f27974 +timeCreated: 1440263098 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga b/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga new file mode 100644 index 0000000..f30afd1 Binary files /dev/null and b/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga differ diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga.meta b/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga.meta new file mode 100644 index 0000000..c7236ea --- /dev/null +++ b/Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: efae273d913dbd940b89144baad4ad3f +timeCreated: 1440263100 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga b/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga new file mode 100644 index 0000000..116c3ba Binary files /dev/null and b/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga differ diff --git a/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga.meta b/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga.meta new file mode 100644 index 0000000..e653519 --- /dev/null +++ b/Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: cc03596f75f893941aa6b96655c176eb +timeCreated: 1440263099 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Bed.prefab b/Assets/Prefabs/Bed.prefab index 7d8eead..840c6a1 100644 Binary files a/Assets/Prefabs/Bed.prefab and b/Assets/Prefabs/Bed.prefab differ diff --git a/Assets/Prefabs/Child.prefab b/Assets/Prefabs/Child.prefab index 016e3b7..a844223 100644 Binary files a/Assets/Prefabs/Child.prefab and b/Assets/Prefabs/Child.prefab differ diff --git a/Assets/Scenes/PatScene.unity b/Assets/Scenes/PatScene.unity index b113749..63edaed 100644 Binary files a/Assets/Scenes/PatScene.unity and b/Assets/Scenes/PatScene.unity differ diff --git a/Assets/Scripts/Child.cs b/Assets/Scripts/Child.cs index 5b607ea..a7ca486 100644 --- a/Assets/Scripts/Child.cs +++ b/Assets/Scripts/Child.cs @@ -81,17 +81,20 @@ public class Child : MonoBehaviour } } else - { + { Vector3 forwardDir = Camera.main.transform.forward; Vector3 rightDir = Camera.main.transform.right; - forwardDir *= _zValue * Speed; - forwardDir.y = _rb.velocity.y; + forwardDir.y = 0f; + forwardDir = forwardDir.normalized * _zValue * Speed; - rightDir *= _xValue * Speed; rightDir.y = 0f; + rightDir = rightDir.normalized * _xValue * Speed; - _rb.velocity = forwardDir + rightDir; + Vector3 movement = forwardDir + rightDir; + movement.y = _rb.velocity.y; + + _rb.velocity = movement; } } @@ -225,6 +228,6 @@ public class Child : MonoBehaviour void OnDestroy() { - XInputDotNetPure.GamePad.SetVibration((XInputDotNetPure.PlayerIndex)_index, 0f, 0f); + ActivateVibration(false); } -} +} \ No newline at end of file diff --git a/Assets/Scripts/MomBehavior.cs b/Assets/Scripts/MomBehavior.cs index b6f95ac..f638131 100644 --- a/Assets/Scripts/MomBehavior.cs +++ b/Assets/Scripts/MomBehavior.cs @@ -16,6 +16,8 @@ public class MomBehavior : MonoBehaviour public float WarningHeadsupTime = 5f; public float MotherStayTime = 2f; + public Child[] Children; + private float _elapsedTime = 0f; private float _nextTriggerTime; @@ -56,6 +58,25 @@ public class MomBehavior : MonoBehaviour StartCoroutine(StayInRoom()); } + + if (_isInRoom) + { + List spottedChildren = new List(); + List safeChildren = new List(); + + foreach (Child child in Children) + { + if (!child.IsSleeping) + { + spottedChildren.Add(child); + } + } + + if (spottedChildren.Count > 0) + { + // TODO: Show a message mentionning the "dead" children + } + } } private IEnumerator StayInRoom()