added coffee

This commit is contained in:
Jack Rus
2020-02-02 16:39:20 -05:00
parent 80371ff1cc
commit b00811a8b0
2 changed files with 248 additions and 26 deletions

View File

@@ -2578,6 +2578,127 @@ PrefabInstance:
objectReference: {fileID: 1671840921}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cc74a3ff6f657d842b5731190a6074d7, type: 3}
--- !u!1001 &813755750
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1692173778}
m_Modifications:
- target: {fileID: 1518483160148691188, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_BodyType
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1747974818995494046, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_SortingLayerID
value: -115631929
objectReference: {fileID: 0}
- target: {fileID: 1747974818995494046, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_SortingLayer
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Offset.x
value: 0.032886505
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Size.x
value: 0.95738983
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Offset.y
value: -0.51
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Size.y
value: 1.31913
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6870250841519595495, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Name
value: Coffee
objectReference: {fileID: 0}
- target: {fileID: 6870250841519595495, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_TagString
value: Coffee
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.x
value: 203
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.y
value: -12
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
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: 9
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}
m_RemovedComponents:
- {fileID: 1518483160148691188, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
--- !u!4 &813755751 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
m_PrefabInstance: {fileID: 813755750}
m_PrefabAsset: {fileID: 0}
--- !u!4 &851631687 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3827363133515929330, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
@@ -3049,12 +3170,12 @@ PrefabInstance:
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.x
value: 132.502
value: 132.5
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.y
value: 37.694
value: 39
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
@@ -49260,6 +49381,127 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1001 &1396451305
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1692173778}
m_Modifications:
- target: {fileID: 1518483160148691188, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_BodyType
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1747974818995494046, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_SortingLayerID
value: -115631929
objectReference: {fileID: 0}
- target: {fileID: 1747974818995494046, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_SortingLayer
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Offset.x
value: 0.032886505
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Size.x
value: 0.95738983
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Offset.y
value: -0.51
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Size.y
value: 1.31913
objectReference: {fileID: 0}
- target: {fileID: 5520736153122788072, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6870250841519595495, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_Name
value: Coffee
objectReference: {fileID: 0}
- target: {fileID: 6870250841519595495, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_TagString
value: Coffee
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.x
value: 33.5
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.y
value: 32.5
objectReference: {fileID: 0}
- target: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
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: 8
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}
m_RemovedComponents:
- {fileID: 1518483160148691188, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 2ccb08e2c4b8851498f8ecbf1a873146, type: 3}
--- !u!4 &1396451306 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7123021364386132083, guid: 2ccb08e2c4b8851498f8ecbf1a873146,
type: 3}
m_PrefabInstance: {fileID: 1396451305}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1486274757
PrefabInstance:
m_ObjectHideFlags: 0
@@ -49644,7 +49886,7 @@ MonoBehaviour:
runErrorThreshold: 0.05
startHealth: 3
startStamina: 100
coffeValuePercent: 10
coffeValuePercent: 25
bugStaminaDamagePercent: 15
hurtVelocity: 20
fightSoundLength: 5
@@ -49717,6 +49959,8 @@ Transform:
- {fileID: 1031922257}
- {fileID: 856721814}
- {fileID: 411222883}
- {fileID: 1396451306}
- {fileID: 813755751}
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@@ -15,7 +15,7 @@ public class Player : MonoBehaviour
[SerializeField] private float runErrorThreshold = 0.05f;
[SerializeField] private int startHealth = 3;
[SerializeField] private int startStamina = 100;
[SerializeField] private int coffeValuePercent = 18;
[SerializeField] private int coffeValuePercent = 25;
[SerializeField] private int bugStaminaDamagePercent = 15;
[SerializeField] private float hurtVelocity = 15f;
[SerializeField] private int fightSoundLength = 5;
@@ -53,28 +53,6 @@ public class Player : MonoBehaviour
private void Update()
{
MovePlayer();
//if (IsPlayerOnWall(true))
//{
// if (collider.sharedMaterial == null || collider.sharedMaterial.friction != 0f)
// {
// collider.sharedMaterial = new PhysicsMaterial2D();
// collider.sharedMaterial.friction = 0f;
// collider.enabled = false;
// collider.enabled = true;
// }
//}
//else
//{
// if (collider.sharedMaterial == null || collider.sharedMaterial.friction == 0f)
// {
// collider.sharedMaterial = new PhysicsMaterial2D();
// collider.sharedMaterial.friction = 0.5f;
// collider.enabled = false;
// collider.enabled = true;
// }
//}
}
public void OnConsumable(Collider2D collision)