mirror of
https://github.com/ConjureETS/PillowFight.git
synced 2026-03-25 09:30:58 +00:00
Merge branch 'master' of https://github.com/ConjureETS/PillowFight
This commit is contained in:
commit
b89e7e1341
9
Assets/Art/Materials.meta
Normal file
9
Assets/Art/Materials.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0c92cbcd5d0adc142b47082933b10684
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1440263099
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Art/Materials/T_Lit_Cadre_D.mat
Normal file
BIN
Assets/Art/Materials/T_Lit_Cadre_D.mat
Normal file
Binary file not shown.
8
Assets/Art/Materials/T_Lit_Cadre_D.mat.meta
Normal file
8
Assets/Art/Materials/T_Lit_Cadre_D.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 69d3bb142e9e6064083dc07f4eb8a2e8
|
||||||
|
timeCreated: 1440263099
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Art/Materials/T_Lit_Drap01_D.mat
Normal file
BIN
Assets/Art/Materials/T_Lit_Drap01_D.mat
Normal file
Binary file not shown.
8
Assets/Art/Materials/T_Lit_Drap01_D.mat.meta
Normal file
8
Assets/Art/Materials/T_Lit_Drap01_D.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d9580703c7aa24d46af0b69d32797918
|
||||||
|
timeCreated: 1440263100
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Art/Materials/T_Lit_Matelas_D.mat
Normal file
BIN
Assets/Art/Materials/T_Lit_Matelas_D.mat
Normal file
Binary file not shown.
8
Assets/Art/Materials/T_Lit_Matelas_D.mat.meta
Normal file
8
Assets/Art/Materials/T_Lit_Matelas_D.mat.meta
Normal 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
BIN
Assets/Art/SM_Lit.FBX
Normal file
Binary file not shown.
86
Assets/Art/SM_Lit.FBX.meta
Normal file
86
Assets/Art/SM_Lit.FBX.meta
Normal 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:
|
||||||
9
Assets/Art/SM_Lit.fbm.meta
Normal file
9
Assets/Art/SM_Lit.fbm.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8ca9f475852ccb84783c150fd0200c1e
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1440263098
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga
Normal file
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 KiB |
55
Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga.meta
Normal file
55
Assets/Art/SM_Lit.fbm/T_Lit_Cadre_D.tga.meta
Normal 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:
|
||||||
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga
Normal file
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 KiB |
55
Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga.meta
Normal file
55
Assets/Art/SM_Lit.fbm/T_Lit_Drap01_D.tga.meta
Normal 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:
|
||||||
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga
Normal file
BIN
Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 KiB |
55
Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga.meta
Normal file
55
Assets/Art/SM_Lit.fbm/T_Lit_Matelas_D.tga.meta
Normal 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.
@ -81,17 +81,20 @@ public class Child : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Vector3 forwardDir = Camera.main.transform.forward;
|
Vector3 forwardDir = Camera.main.transform.forward;
|
||||||
Vector3 rightDir = Camera.main.transform.right;
|
Vector3 rightDir = Camera.main.transform.right;
|
||||||
|
|
||||||
forwardDir *= _zValue * Speed;
|
forwardDir.y = 0f;
|
||||||
forwardDir.y = _rb.velocity.y;
|
forwardDir = forwardDir.normalized * _zValue * Speed;
|
||||||
|
|
||||||
rightDir *= _xValue * Speed;
|
|
||||||
rightDir.y = 0f;
|
rightDir.y = 0f;
|
||||||
|
rightDir = rightDir.normalized * _xValue * Speed;
|
||||||
|
|
||||||
_rb.velocity = forwardDir + rightDir;
|
Vector3 movement = forwardDir + rightDir;
|
||||||
|
movement.y = _rb.velocity.y;
|
||||||
|
|
||||||
|
_rb.velocity = movement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,6 +165,25 @@ public class Child : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Debug.Log("Player " + _index + " entered lava. Lose one life.");
|
Debug.Log("Player " + _index + " entered lava. Lose one life.");
|
||||||
TakeLavaDamage();
|
TakeLavaDamage();
|
||||||
|
ActivateVibration(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Setup for the next time the player falls on the lava
|
||||||
|
_invulnerableTime = MaxInvulnerableTime;
|
||||||
|
|
||||||
|
if (collision.gameObject.tag == "Floor")
|
||||||
|
{
|
||||||
|
ActivateVibration(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnCollisionExit(Collision collision)
|
||||||
|
{
|
||||||
|
if (collision.gameObject.tag == "Lava" || collision.gameObject.tag == "Floor")
|
||||||
|
{
|
||||||
|
ActivateVibration(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,6 +198,12 @@ public class Child : MonoBehaviour
|
|||||||
Debug.Log("Player " + _index + " is still standing on lava. Lose one life.");
|
Debug.Log("Player " + _index + " is still standing on lava. Lose one life.");
|
||||||
TakeLavaDamage();
|
TakeLavaDamage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ActivateVibration(true);
|
||||||
|
}
|
||||||
|
else if (collision.gameObject.tag == "Floor")
|
||||||
|
{
|
||||||
|
ActivateVibration(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,10 +213,21 @@ public class Child : MonoBehaviour
|
|||||||
_rb.AddForce(force);
|
_rb.AddForce(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ActivateVibration(bool activate)
|
||||||
|
{
|
||||||
|
float intensity = activate ? 0.3f : 0f;
|
||||||
|
|
||||||
|
XInputDotNetPure.GamePad.SetVibration((XInputDotNetPure.PlayerIndex)_index, intensity, intensity);
|
||||||
|
}
|
||||||
|
|
||||||
private void TakeLavaDamage()
|
private void TakeLavaDamage()
|
||||||
{
|
{
|
||||||
// TODO: Lose a life (probably) and become immune for ~ 2 or 3 seconds
|
// TODO: Lose a life (probably) and become immune for ~ 2 or 3 seconds
|
||||||
|
|
||||||
_invulnerableTime = 0f;
|
_invulnerableTime = 0f;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
ActivateVibration(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,6 +16,8 @@ public class MomBehavior : MonoBehaviour
|
|||||||
public float WarningHeadsupTime = 5f;
|
public float WarningHeadsupTime = 5f;
|
||||||
public float MotherStayTime = 2f;
|
public float MotherStayTime = 2f;
|
||||||
|
|
||||||
|
public Child[] Children;
|
||||||
|
|
||||||
private float _elapsedTime = 0f;
|
private float _elapsedTime = 0f;
|
||||||
|
|
||||||
private float _nextTriggerTime;
|
private float _nextTriggerTime;
|
||||||
@ -56,6 +58,25 @@ public class MomBehavior : MonoBehaviour
|
|||||||
|
|
||||||
StartCoroutine(StayInRoom());
|
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()
|
private IEnumerator StayInRoom()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user