Add the new bed prefabs and fixed the movement (I think)

This commit is contained in:
Patrice Vignola 2015-08-22 14:01:28 -04:00
parent d7092b4af6
commit 516f6b6791
21 changed files with 324 additions and 7 deletions

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0c92cbcd5d0adc142b47082933b10684
folderAsset: yes
timeCreated: 1440263099
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 69d3bb142e9e6064083dc07f4eb8a2e8
timeCreated: 1440263099
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d9580703c7aa24d46af0b69d32797918
timeCreated: 1440263100
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d40c7a9a950ef943b7b5d50a03e8c4e
timeCreated: 1440263099
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Art/SM_Lit.FBX Normal file

Binary file not shown.

View File

@ -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:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8ca9f475852ccb84783c150fd0200c1e
folderAsset: yes
timeCreated: 1440263098
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

View File

@ -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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

View File

@ -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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

View File

@ -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:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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);
}
}
}

View File

@ -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<Child> spottedChildren = new List<Child>();
List<Child> safeChildren = new List<Child>();
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()