Commit to complete merge.

This commit is contained in:
Sweet Tini
2020-02-02 16:03:10 -05:00
10 changed files with 1989 additions and 894 deletions

View File

@@ -2,8 +2,9 @@
using System.Collections.Generic;
using UnityEngine;
public class Coffee : MonoBehaviour
public class CoffeeOrPizza : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
@@ -15,4 +16,9 @@ public class Coffee : MonoBehaviour
{
}
private void OnTriggerEnter2D(Collider2D collision)
{
collision.gameObject.GetComponent<Player>().OnConsumable(GetComponent<Collider2D>());
}
}

View File

@@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 5520736153122788072}
- component: {fileID: 1518483160148691188}
- component: {fileID: 6284992550610256572}
- component: {fileID: 3900805189195330219}
m_Layer: 0
m_Name: Coffee
m_TagString: Untagged
@@ -150,3 +151,15 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &3900805189195330219
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6870250841519595495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5b72c6073f9135a4894350d4cde51a76, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -120,251 +120,12 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &776002143
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 776002144}
- component: {fileID: 776002146}
- component: {fileID: 776002145}
m_Layer: 5
m_Name: GAME OVER
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!224 &776002144
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776002143}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.0390081, y: 1.326184, z: 1.326184}
m_Children: []
m_Father: {fileID: 1820456178}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 55.5}
m_SizeDelta: {x: 256, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &776002145
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776002143}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 43d59b5c638b0664db55f3a4e4d130ef, type: 2}
m_Color: {r: 1, g: 0, b: 0.20116901, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 35
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'GAME
OVER'
--- !u!222 &776002146
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776002143}
m_CullTransparentMesh: 0
--- !u!20 &998016119 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 5711328081315814051, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
m_PrefabInstance: {fileID: 1197329722}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1025781617
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1025781619}
- component: {fileID: 1025781618}
m_Layer: 0
m_Name: Coffee
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &1025781618
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1025781617}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 66b61c174b527e14e9b5ad791405c46e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.5, y: 1.5}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1025781619
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1025781617}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.564754, y: 1.8036937, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1027433821
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1027433823}
- component: {fileID: 1027433822}
m_Layer: 0
m_Name: Pizza
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &1027433822
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1027433821}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: e6c9043b5a052f544b71e5612261b1be, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.5, y: 1.5}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &1027433823
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1027433821}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 6.77, y: 3.12, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1182104965
GameObject:
m_ObjectHideFlags: 0
@@ -601,6 +362,91 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1240454727
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6870250841519595495, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Name
value: Coffee
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.x
value: -5.76
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.y
value: 3.96
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.z
value: 100
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalScale.z
value: -0.45
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 1518483160148691188, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
--- !u!1 &1373063663
GameObject:
m_ObjectHideFlags: 0
@@ -678,6 +524,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1373063663}
m_CullTransparentMesh: 0
--- !u!1 &1392404505
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1392404506}
- component: {fileID: 1392404507}
m_Layer: 0
m_Name: Game Over Screen
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1392404506
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1392404505}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.6, y: 56.6, z: -1600}
m_LocalScale: {x: 47.36, y: 47.36, z: 47.36}
m_Children: []
m_Father: {fileID: 1820456178}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1392404507
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1392404505}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 36246861c4a500545ab783da2610e29b, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 2.56, y: 2.4}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1451273275
GameObject:
m_ObjectHideFlags: 0
@@ -810,6 +736,90 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
button: {fileID: 1451273277}
--- !u!1001 &1626069623
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1137786072160203054, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_Name
value: Pizza
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalPosition.x
value: 5.69
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalPosition.y
value: 3.46
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalPosition.z
value: 100
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8554420466772133694, guid: f859e1c9214db2c4eaaeff51febb3222,
type: 3}
propertyPath: m_LocalScale.z
value: 0.0625
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f859e1c9214db2c4eaaeff51febb3222, type: 3}
--- !u!1 &1774738188
GameObject:
m_ObjectHideFlags: 0
@@ -1002,8 +1012,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1392404506}
- {fileID: 2106947133}
- {fileID: 776002144}
- {fileID: 1451273276}
m_Father: {fileID: 0}
m_RootOrder: 1
@@ -1289,7 +1299,7 @@ Transform:
m_LocalScale: {x: 16, y: 16, z: 1}
m_Children: []
m_Father: {fileID: 1820456178}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2106947134
SpriteRenderer:

File diff suppressed because it is too large Load Diff

View File

@@ -15,9 +15,10 @@ public class Player : MonoBehaviour
[SerializeField] private float runErrorThreshold = 0.05f;
[SerializeField] private int startHealth = 3;
[SerializeField] private int startStamina = 100;
[SerializeField] private int coffeValuePercent = 10;
[SerializeField] private int coffeValuePercent = 18;
[SerializeField] private int bugStaminaDamagePercent = 15;
[SerializeField] private float hurtVelocity = 15f;
[SerializeField] private int fightSoundLength = 5;
private int currentHealth;
private int currentStamina;
@@ -32,7 +33,7 @@ public class Player : MonoBehaviour
private bool isMovementEnabled = true;
private bool isFighting = false;
private bool isHurt = false;
private int fightSoundAccumalator = 0;
private bool isPlayerHurt = false;
private void Start()
@@ -76,18 +77,18 @@ public class Player : MonoBehaviour
}
void OnCollisionEnter2D(Collision2D coll)
public void OnConsumable(Collider2D collision)
{
if (coll.gameObject.tag == "Pizza")
if (collision.gameObject.tag == "Pizza")
{
SoundManagerScript.PlaySound("eat");
Destroy(coll.gameObject);
Destroy(collision.gameObject);
currentHealth += currentHealth < startHealth ? 1 : 0;
healthBar.size = new Vector2(1.5f * currentHealth, this.healthBar.size.y);
}
else if (coll.gameObject.tag == "Coffee")
else if (collision.gameObject.tag == "Coffee")
{
Destroy(coll.gameObject);
Destroy(collision.gameObject);
DrinkCoffee();
}
}
@@ -116,7 +117,6 @@ public class Player : MonoBehaviour
private void Hurt()
{
currentHealth = 3; // TODO: REMOVE!
currentHealth -= currentHealth > 0 ? 1 : 0;
healthBar.size = new Vector2(1.5f * currentHealth, this.healthBar.size.y);
@@ -143,7 +143,6 @@ public class Player : MonoBehaviour
isHurt = false;
};
PlayFightSound();
HandleAnimations();
}
@@ -264,7 +263,15 @@ public class Player : MonoBehaviour
{
if (isFighting && !isPlayerHurt)
{
SoundManagerScript.PlaySound(GetRandomFightClipName());
if (fightSoundAccumalator >= fightSoundLength)
{
SoundManagerScript.PlaySound(GetRandomFightClipName());
fightSoundAccumalator = 0;
}
else
{
fightSoundAccumalator++;
}
}
}
@@ -304,6 +311,6 @@ public class Player : MonoBehaviour
public float GetStaminaDifficultyFactor()
{
return currentStamina / (startStamina * 1f);
return Mathf.Clamp(currentStamina / (startStamina * 1f), 0.27f, 1);
}
}

View File

@@ -22,26 +22,26 @@ AnimationClip:
- time: 0
value: {fileID: 7517966211872351750, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
- time: 0.06666667
- time: 0.1
value: {fileID: -1599933099690305131, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
- time: 0.13333334
- time: 0.2
value: {fileID: -7233012564116182953, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
- time: 0.2
- time: 0.3
value: {fileID: 1030234472550356571, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
- time: 0.26666668
- time: 0.4
value: {fileID: 1045035048788072705, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
- time: 0.33333334
- time: 0.5
value: {fileID: -5154125455451761606, guid: 9c84b707645e8ef48a94be5c93579154,
type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 15
m_SampleRate: 10
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@@ -67,7 +67,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.4
m_StopTime: 0.6
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0

View File

@@ -22,26 +22,26 @@ AnimationClip:
- time: 0
value: {fileID: 1702949257448659930, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
- time: 0.06666667
- time: 0.1
value: {fileID: 2228231786184334263, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
- time: 0.13333334
- time: 0.2
value: {fileID: 7883326084881811524, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
- time: 0.2
- time: 0.3
value: {fileID: 1401680154723100908, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
- time: 0.26666668
- time: 0.4
value: {fileID: 7996375002285474790, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
- time: 0.33333334
- time: 0.5
value: {fileID: -3004614339896886377, guid: 595c2e3d43f63344e8d4392619cda1d0,
type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 15
m_SampleRate: 10
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@@ -67,7 +67,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.4
m_StopTime: 0.6
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 36246861c4a500545ab783da2610e29b
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: