This commit is contained in:
Jack Rus
2020-02-02 13:39:17 -05:00
13 changed files with 518 additions and 16 deletions

View File

@@ -151,7 +151,7 @@ Rigidbody2D:
m_Interpolate: 0
m_SleepingMode: 0
m_CollisionDetection: 1
m_Constraints: 0
m_Constraints: 4
--- !u!95 &-6605527394410161759
Animator:
serializedVersion: 3

View File

@@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &4498330050389957151
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: playerCollider
value:
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: eventControls
value:
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: player
value:
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: movementSpeed
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201377, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 6200000, guid: 8bbf95d8d23ff94449785e66e0ae11ec, type: 2}
- target: {fileID: 4815066122311201377, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Constraints
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201378, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Name
value: JackBug Variant
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201378, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_TagString
value: Jack Bug
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.x
value: 55.5
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.y
value: -11.5
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalScale.x
value: -1
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201382, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: -6315775801511994756, guid: 62b02404473a1014f8c946f474c39aa9,
type: 3}
- target: {fileID: 4815066122311201383, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_SpriteTilingProperty.pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201383, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_SpriteTilingProperty.oldSize.y
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6024541455133375798, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: fd65b2863cc560a40b6ad3af267aac55, type: 2}
- target: {fileID: 6024541455133375798, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_ApplyRootMotion
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c98830a6bebcdc24b91c550a26c9b621, type: 3}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cc74a3ff6f657d842b5731190a6074d7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: a01c0a314f63f5c4aaf9d28a33e9d2f2
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1487,6 +1487,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
--- !u!4 &851631687 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3827363133515929330, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
type: 3}
m_PrefabInstance: {fileID: 1879087608}
m_PrefabAsset: {fileID: 0}
--- !u!1 &925144586
GameObject:
m_ObjectHideFlags: 0
@@ -1767,12 +1773,21 @@ Transform:
- {fileID: 1491654}
- {fileID: 193535121}
- {fileID: 1247097598}
- {fileID: 851631687}
- {fileID: 1934521842}
- {fileID: 8021909}
- {fileID: 951888605}
- {fileID: 1200440357}
- {fileID: 1028395223}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1028395223 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
m_PrefabInstance: {fileID: 8942784746345332693}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1028911173
PrefabInstance:
m_ObjectHideFlags: 0
@@ -46887,6 +46902,111 @@ Tilemap:
e31: 0
e32: 0
e33: 1
--- !u!1001 &1200440356
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1008122163}
m_Modifications:
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: playerCollider
value:
objectReference: {fileID: 1671840919}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: eventControls
value:
objectReference: {fileID: 1491655}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: player
value:
objectReference: {fileID: 1671840921}
- target: {fileID: 4815066122311201376, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: movementSpeed
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201377, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 6200000, guid: 8bbf95d8d23ff94449785e66e0ae11ec, type: 2}
- target: {fileID: 4815066122311201378, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_Name
value: KatBug
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.x
value: 14
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.y
value: -13
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c98830a6bebcdc24b91c550a26c9b621, type: 3}
--- !u!4 &1200440357 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4815066122311201381, guid: c98830a6bebcdc24b91c550a26c9b621,
type: 3}
m_PrefabInstance: {fileID: 1200440356}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1220663790
GameObject:
m_ObjectHideFlags: 0
@@ -47258,7 +47378,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1671840916}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -10.5, y: 10, z: 0}
m_LocalPosition: {x: 62.5, y: 4.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1008122163}
@@ -48364,3 +48484,117 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
--- !u!1001 &8942784746345332693
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1008122163}
m_Modifications:
- target: {fileID: 8989126000173721720, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Offset.y
value: -0.031505585
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721720, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Size.y
value: 4.7140064
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721720, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Offset.x
value: 0.037693024
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721720, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Size.x
value: 3.5875473
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalPosition.x
value: 60
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalPosition.y
value: -11.5
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_RootOrder
value: 9
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721722, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721725, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Name
value: JackBug
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721726, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_GravityScale
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721726, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: m_Constraints
value: 6
objectReference: {fileID: 0}
- target: {fileID: 8989126000173721727, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: playerCollider
value:
objectReference: {fileID: 1671840919}
- target: {fileID: 8989126000173721727, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: eventControls
value:
objectReference: {fileID: 1491655}
- target: {fileID: 8989126000173721727, guid: cc74a3ff6f657d842b5731190a6074d7,
type: 3}
propertyPath: player
value:
objectReference: {fileID: 1671840921}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cc74a3ff6f657d842b5731190a6074d7, type: 3}

View File

@@ -269,6 +269,8 @@ public class Player : MonoBehaviour
isPlayerHurt = false;
isFighting = true;
isMovementEnabled = false;
rigidBody.gravityScale = 0f;
rigidBody.velocity = Vector2.zero;
}
public void EndEncounter()
@@ -276,6 +278,7 @@ public class Player : MonoBehaviour
isPlayerHurt = false;
isFighting = false;
isMovementEnabled = true;
rigidBody.gravityScale = 1f;
DecreaseStaminaAfterBugFight();
}
@@ -285,5 +288,6 @@ public class Player : MonoBehaviour
GetComponent<Rigidbody2D>().velocity += new Vector2(Mathf.Sign(transform.localScale.x) * -1 * hurtVelocity, hurtVelocity);
isFighting = false;
isHurt = true;
Hurt();
}
}

View File

@@ -36,43 +36,46 @@ public class SoundManagerScript : MonoBehaviour
public static void PlaySound(string clip)
{
AudioClip sound = null;
switch (clip)
{
case "jump":
audioSrc.PlayOneShot(jumpSound);
sound = jumpSound;
break;
case "scream":
audioSrc.PlayOneShot(screamSound);
sound = screamSound;
break;
case "wrong":
audioSrc.PlayOneShot(wrongButtonSound);
sound = wrongButtonSound;
break;
case "bug laugh":
audioSrc.PlayOneShot(bugLaughSound);
sound = bugLaughSound;
break;
case "drink":
audioSrc.PlayOneShot(drinkSound);
sound = drinkSound;
break;
case "eat":
audioSrc.PlayOneShot(eatSound);
sound = eatSound;
break;
case "punch":
audioSrc.PlayOneShot(punchSound);
sound = punchSound;
break;
case "hard punch":
audioSrc.PlayOneShot(hardPunchSound);
sound = hardPunchSound;
break;
case "slap":
audioSrc.PlayOneShot(slapSound);
sound = slapSound;
break;
case "hard slap":
audioSrc.PlayOneShot(hardSlapSound);
sound = hardSlapSound;
break;
case "win":
audioSrc.clip = winSound;
audioSrc.PlayOneShot(winSound);
sound = winSound;
break;
}
audioSrc.clip = sound;
audioSrc.PlayOneShot(sound);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 2ab19b79ca1e5fd478932044e6ef3d11
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
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
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -7,5 +7,5 @@ PhysicsMaterial2D:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Bug Physics Material
friction: 0.05
friction: 10
bounciness: 0

View File

@@ -239,7 +239,7 @@ AnimatorController:
m_Controller: {fileID: 0}
- m_Name: YVelocity
m_Type: 1
m_DefaultFloat: 0
m_DefaultFloat: 1
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
@@ -438,6 +438,9 @@ AnimatorStateTransition:
- m_ConditionMode: 2
m_ConditionEvent: IsHurt
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: IsFighting
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 3835953866042416}
m_Solo: 0

View File

@@ -7,6 +7,7 @@ TagManager:
- Pizza
- Coffee
- Kat Bug
- Jack Bug
layers:
- Default
- TransparentFX