Improve VR playmode

This commit is contained in:
Jens Pitkänen 2020-05-01 05:37:20 +03:00
parent fe95c02721
commit 7b3faac7a7
24 changed files with 1667 additions and 79 deletions

View File

@ -216,13 +216,13 @@ AudioMixerSnapshotController:
11485b2babea73b418583c5e68bf0e01: -49.6 11485b2babea73b418583c5e68bf0e01: -49.6
d3d28f4b939c15c4fb46575e1562c52b: 9 d3d28f4b939c15c4fb46575e1562c52b: 9
6dc2be7b017f6454a88a82cf0827df64: -2565 6dc2be7b017f6454a88a82cf0827df64: -2565
8abcd1dbe0a90d24c82e3c8fe1b5b768: 15.7 8abcd1dbe0a90d24c82e3c8fe1b5b768: 14
78fcf9db4a62d1b488ab94c688e1a688: -5.7224774 78fcf9db4a62d1b488ab94c688e1a688: -5.7224774
f19752ebc23b70b42aecce984551e28b: 0 f19752ebc23b70b42aecce984551e28b: 0
df94a53c2f1911543a5abb9a08a837dd: 77 df94a53c2f1911543a5abb9a08a837dd: 77
05a3cc7c5a9b4e4448c07125cb163320: 0.424 05a3cc7c5a9b4e4448c07125cb163320: 0.424
7d112fbca2a5dd8459f2c00b517f7bac: 0.52900004 7d112fbca2a5dd8459f2c00b517f7bac: 0.52900004
fd01f6bdeaa870c4688fa6fcad7c3e41: -80 fd01f6bdeaa870c4688fa6fcad7c3e41: 0
3b873ffd7476b574ab79c605a05a50ff: 0 3b873ffd7476b574ab79c605a05a50ff: 0
fb93bc0e4abea1d4e840f1f2832ba33d: 6 fb93bc0e4abea1d4e840f1f2832ba33d: 6
a1407a7e6f887dd4eac4400887eda079: 3481 a1407a7e6f887dd4eac4400887eda079: 3481
@ -347,6 +347,8 @@ AudioMixerController:
name: Master Volume name: Master Volume
- guid: da78777609f75db4482d8f0c2a6597d7 - guid: da78777609f75db4482d8f0c2a6597d7
name: Diary Volume name: Diary Volume
- guid: 78fcf9db4a62d1b488ab94c688e1a688
name: Teleport Volume
m_AudioMixerGroupViews: m_AudioMixerGroupViews:
- guids: - guids:
- cce571dfddcbc694fa5856a9866157f8 - cce571dfddcbc694fa5856a9866157f8
@ -596,7 +598,8 @@ AudioMixerSnapshotController:
9f37ae073eb26e54f93d6ea7c5e77b1b: 2000 9f37ae073eb26e54f93d6ea7c5e77b1b: 2000
d3315d995104d364ab05091350d51b94: 3.4 d3315d995104d364ab05091350d51b94: 3.4
d3d28f4b939c15c4fb46575e1562c52b: 9 d3d28f4b939c15c4fb46575e1562c52b: 9
8abcd1dbe0a90d24c82e3c8fe1b5b768: 15.7 8abcd1dbe0a90d24c82e3c8fe1b5b768: 14
78fcf9db4a62d1b488ab94c688e1a688: -6.133707
7d112fbca2a5dd8459f2c00b517f7bac: 0.52900004 7d112fbca2a5dd8459f2c00b517f7bac: 0.52900004
fd01f6bdeaa870c4688fa6fcad7c3e41: 0 fd01f6bdeaa870c4688fa6fcad7c3e41: 0
3b873ffd7476b574ab79c605a05a50ff: 0 3b873ffd7476b574ab79c605a05a50ff: 0

View File

@ -141,6 +141,7 @@ GameObject:
- component: {fileID: 2081929903982442016} - component: {fileID: 2081929903982442016}
- component: {fileID: 1226804790312226784} - component: {fileID: 1226804790312226784}
- component: {fileID: 8044237247712289850} - component: {fileID: 8044237247712289850}
- component: {fileID: 3263701516971022914}
m_Layer: 0 m_Layer: 0
m_Name: BurningStick m_Name: BurningStick
m_TagString: Untagged m_TagString: Untagged
@ -228,7 +229,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
IgnitePoint: {fileID: 7948189956267693667} IgnitePoint: {fileID: 7948189956267693667}
Grabbed: 0
--- !u!114 &8044237247712289850 --- !u!114 &8044237247712289850
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -242,6 +242,20 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Quality: {fileID: 11400000, guid: 62d0193d1d08b814d9328f3dd1d117cb, type: 2} Quality: {fileID: 11400000, guid: 62d0193d1d08b814d9328f3dd1d117cb, type: 2}
BurningInCampfire: 0
--- !u!114 &3263701516971022914
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c56f91485b827a54282444c63a631645, type: 3}
m_Name:
m_EditorClassIdentifier:
Grabbed: 0
--- !u!1 &2819347287429737535 --- !u!1 &2819347287429737535
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 388935964095823360} - component: {fileID: 388935964095823360}
- component: {fileID: 8749723819828979553} - component: {fileID: 8749723819828979553}
- component: {fileID: 7525334960177098028} - component: {fileID: 7525334960177098028}
- component: {fileID: 8975157805693148889}
m_Layer: 13 m_Layer: 13
m_Name: Casette m_Name: Casette
m_TagString: Untagged m_TagString: Untagged
@ -165,6 +166,19 @@ AudioSource:
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
--- !u!114 &8975157805693148889
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 388935964095823366}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c56f91485b827a54282444c63a631645, type: 3}
m_Name:
m_EditorClassIdentifier:
Grabbed: 0
--- !u!65 &6986160423568067126 --- !u!65 &6986160423568067126
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -57,6 +57,7 @@ GameObject:
- component: {fileID: 3556743581346332214} - component: {fileID: 3556743581346332214}
- component: {fileID: 1732996613952540235} - component: {fileID: 1732996613952540235}
- component: {fileID: 7014937997629475779} - component: {fileID: 7014937997629475779}
- component: {fileID: 1586168142063138938}
m_Layer: 10 m_Layer: 10
m_Name: stick m_Name: stick
m_TagString: Untagged m_TagString: Untagged
@ -95,7 +96,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
IgnitePoint: {fileID: 8934967594637573488} IgnitePoint: {fileID: 8934967594637573488}
Grabbed: 0
--- !u!54 &1732996613952540235 --- !u!54 &1732996613952540235
Rigidbody: Rigidbody:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -125,6 +125,20 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Quality: {fileID: 11400000, guid: 273b9cf97d0c80e449f24a33a2d261d1, type: 2} Quality: {fileID: 11400000, guid: 273b9cf97d0c80e449f24a33a2d261d1, type: 2}
BurningInCampfire: 0
--- !u!114 &1586168142063138938
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c56f91485b827a54282444c63a631645, type: 3}
m_Name:
m_EditorClassIdentifier:
Grabbed: 0
--- !u!1 &7882310482220326929 --- !u!1 &7882310482220326929
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -0,0 +1,324 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &748295692191117788
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7463360716497058313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6cecbf2dde7aad74e99c3fa1afac72ea, type: 3}
m_Name:
m_EditorClassIdentifier:
Distance: 4
PickedUp: 0
--- !u!114 &5464811835824480554
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7463360716497058313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ffefbea063cab884ca33e5a449e5c22c, type: 3}
m_Name:
m_EditorClassIdentifier:
attachmentFlags: 44
attachmentOffset: {fileID: 0}
catchingSpeedThreshold: -1
releaseVelocityStyle: 1
releaseVelocityTimeOffset: -0.011
scaleReleaseVelocity: 1.1
scaleReleaseVelocityThreshold: -1
scaleReleaseVelocityCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
restoreOriginalParent: 0
onPickUp:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 748295692191117788}
m_MethodName: Pickup
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 2195718456027732694}
m_MethodName: Grab
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 1989371957929927534}
m_MethodName: PickupVR
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
onDetachFromHand:
m_PersistentCalls:
m_Calls: []
onHeldUpdate:
m_PersistentCalls:
m_Calls: []
interactable: {fileID: 0}
--- !u!114 &8327858439675715813
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7463360716497058313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b93b6a877adcbf94c89a9d6e0c0e844d, type: 3}
m_Name:
m_EditorClassIdentifier:
activateActionSetOnAttach:
actionSetPath:
hideHandOnAttach: 0
hideSkeletonOnAttach: 0
hideControllerOnAttach: 0
handAnimationOnPickup: 0
setRangeOfMotionOnPickup: -1
useHandObjectAttachmentPoint: 1
attachEaseIn: 0
snapAttachEaseInCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
snapAttachEaseInTime: 0.15
snapAttachEaseInCompleted: 0
skeletonPoser: {fileID: 0}
handFollowTransform: 1
highlightOnHover: 1
hideHighlight: []
hoverPriority: 0
--- !u!1001 &7131142377223701519
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823363, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 388935964095823366, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_Name
value: Casette VR
objectReference: {fileID: 0}
- target: {fileID: 388935964095823366, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 90
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4620539269408403861, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6986160423568067126, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7525334960177098028, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_Volume
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 8521982733029884806, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 354995f43a462b04db424bdef965fd1d, type: 3}
--- !u!1 &7463360716497058313 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 388935964095823366, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
m_PrefabInstance: {fileID: 7131142377223701519}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1989371957929927534 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8749723819828979553, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
m_PrefabInstance: {fileID: 7131142377223701519}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7463360716497058313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df6e90d9f78abce48bed9c6269482e28, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2195718456027732694 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8975157805693148889, guid: 354995f43a462b04db424bdef965fd1d,
type: 3}
m_PrefabInstance: {fileID: 7131142377223701519}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7463360716497058313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c56f91485b827a54282444c63a631645, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

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

View File

@ -0,0 +1,83 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &9034356446809472333
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375417352542439262, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5825517555167498412, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: StickPrefab
value:
objectReference: {fileID: 2086008818391599545, guid: 80f5f5c732639d14aa44d2839c4e98e3,
type: 3}
- target: {fileID: 5825517555167498412, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: CasettePrefab
value:
objectReference: {fileID: 7463360716497058313, guid: 110da3f1de00910458a9e4ffd3585f94,
type: 3}
- target: {fileID: 8593229712972662916, guid: 083f2630e3468274594f4435b3e82c1d,
type: 3}
propertyPath: m_Name
value: Stick Spawner VR
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 083f2630e3468274594f4435b3e82c1d, type: 3}

View File

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

View File

@ -4899,10 +4899,12 @@ GameObject:
- component: {fileID: 1830340994370403595} - component: {fileID: 1830340994370403595}
- component: {fileID: 1732996613952540235} - component: {fileID: 1732996613952540235}
- component: {fileID: 1066568521765371770} - component: {fileID: 1066568521765371770}
- component: {fileID: 8040624348277143565}
- component: {fileID: 2499151591214202486} - component: {fileID: 2499151591214202486}
- component: {fileID: 5807904180460221178}
- component: {fileID: 4109150851726414724} - component: {fileID: 4109150851726414724}
- component: {fileID: 3611004544794653208} - component: {fileID: 3611004544794653208}
- component: {fileID: 3775824340653869256}
- component: {fileID: 2310007994178076195}
m_Layer: 10 m_Layer: 10
m_Name: Stick VR m_Name: Stick VR
m_TagString: Untagged m_TagString: Untagged
@ -4957,7 +4959,7 @@ MonoBehaviour:
actionSetPath: actionSetPath:
hideHandOnAttach: 0 hideHandOnAttach: 0
hideSkeletonOnAttach: 0 hideSkeletonOnAttach: 0
hideControllerOnAttach: 0 hideControllerOnAttach: 1
handAnimationOnPickup: 0 handAnimationOnPickup: 0
setRangeOfMotionOnPickup: -1 setRangeOfMotionOnPickup: -1
useHandObjectAttachmentPoint: 1 useHandObjectAttachmentPoint: 1
@ -4993,36 +4995,7 @@ MonoBehaviour:
highlightOnHover: 1 highlightOnHover: 1
hideHighlight: [] hideHighlight: []
hoverPriority: 0 hoverPriority: 0
--- !u!114 &2499151591214202486 --- !u!114 &8040624348277143565
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e7418c7dd8f977d4e969202d3fa7e926, type: 3}
m_Name:
m_EditorClassIdentifier:
poseEditorExpanded: 1
blendEditorExpanded: 1
poseNames:
- StickHoldPose (MAIN)
overridePreviewLeftHandPrefab: {fileID: 1000013348574242, guid: 638779290bce1af49b356f33dcc6fccf,
type: 3}
overridePreviewRightHandPrefab: {fileID: 1000010304998954, guid: 6def53d002137b747aec0b29551e0e25,
type: 3}
skeletonMainPose: {fileID: 11400000, guid: 7d44e06d0a950e84d8906232374c8ac3, type: 2}
skeletonAdditionalPoses: []
showLeftPreview: 0
showRightPreview: 0
previewLeftInstance: {fileID: 0}
previewRightInstance: {fileID: 0}
previewPoseSelection: 0
blendingBehaviours: []
scale: 1
--- !u!114 &5807904180460221178
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -5034,7 +5007,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ffefbea063cab884ca33e5a449e5c22c, type: 3} m_Script: {fileID: 11500000, guid: ffefbea063cab884ca33e5a449e5c22c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
attachmentFlags: 44 attachmentFlags: 85
attachmentOffset: {fileID: 0} attachmentOffset: {fileID: 0}
catchingSpeedThreshold: -1 catchingSpeedThreshold: -1
releaseVelocityStyle: 1 releaseVelocityStyle: 1
@ -5068,7 +5041,29 @@ MonoBehaviour:
restoreOriginalParent: 0 restoreOriginalParent: 0
onPickUp: onPickUp:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls:
- m_Target: {fileID: 3775824340653869256}
m_MethodName: Pickup
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 2310007994178076195}
m_MethodName: Grab
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
onDetachFromHand: onDetachFromHand:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -5076,6 +5071,35 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
interactable: {fileID: 0} interactable: {fileID: 0}
--- !u!114 &2499151591214202486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e7418c7dd8f977d4e969202d3fa7e926, type: 3}
m_Name:
m_EditorClassIdentifier:
poseEditorExpanded: 1
blendEditorExpanded: 1
poseNames:
- StickHoldPose (MAIN)
overridePreviewLeftHandPrefab: {fileID: 1000013348574242, guid: 638779290bce1af49b356f33dcc6fccf,
type: 3}
overridePreviewRightHandPrefab: {fileID: 1000010304998954, guid: 6def53d002137b747aec0b29551e0e25,
type: 3}
skeletonMainPose: {fileID: 11400000, guid: 7d44e06d0a950e84d8906232374c8ac3, type: 2}
skeletonAdditionalPoses: []
showLeftPreview: 0
showRightPreview: 0
previewLeftInstance: {fileID: 0}
previewRightInstance: {fileID: 0}
previewPoseSelection: 0
blendingBehaviours: []
scale: 1
--- !u!114 &4109150851726414724 --- !u!114 &4109150851726414724
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5089,7 +5113,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
IgnitedQuality: {fileID: 11400000, guid: 62d0193d1d08b814d9328f3dd1d117cb, type: 2} IgnitedQuality: {fileID: 11400000, guid: 62d0193d1d08b814d9328f3dd1d117cb, type: 2}
IgniteDuration: 0.25 IgniteDuration: 1
Ignited: 0 Ignited: 0
TorchDuration: 60 TorchDuration: 60
TorchWarnDuration: 15 TorchWarnDuration: 15
@ -5099,6 +5123,12 @@ MonoBehaviour:
TorchLight: {fileID: 8748250233633719603} TorchLight: {fileID: 8748250233633719603}
WarnColor: {r: 1, g: 0.6509804, b: 0.44705883, a: 1} WarnColor: {r: 1, g: 0.6509804, b: 0.44705883, a: 1}
FireVolume: {fileID: 7969813197317806167} FireVolume: {fileID: 7969813197317806167}
TorchSound: {fileID: 6154545472424041098}
FireClips:
- {fileID: 8300000, guid: 280c9d9eb97f5ce4d857fb945bfddb1e, type: 3}
- {fileID: 8300000, guid: f33dea627b0de8248a82605c4e0e6e71, type: 3}
- {fileID: 8300000, guid: 021edc202d1cd73478de90d9a3ead06e, type: 3}
- {fileID: 8300000, guid: 2d22ab70306de704598b89a705777afb, type: 3}
TorchFuel: 0 TorchFuel: 0
--- !u!114 &3611004544794653208 --- !u!114 &3611004544794653208
MonoBehaviour: MonoBehaviour:
@ -5113,6 +5143,34 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Quality: {fileID: 11400000, guid: 273b9cf97d0c80e449f24a33a2d261d1, type: 2} Quality: {fileID: 11400000, guid: 273b9cf97d0c80e449f24a33a2d261d1, type: 2}
BurningInCampfire: 0
--- !u!114 &3775824340653869256
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6cecbf2dde7aad74e99c3fa1afac72ea, type: 3}
m_Name:
m_EditorClassIdentifier:
Distance: 4
PickedUp: 0
--- !u!114 &2310007994178076195
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2086008818391599545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c56f91485b827a54282444c63a631645, type: 3}
m_Name:
m_EditorClassIdentifier:
Grabbed: 0
--- !u!1 &2973616090333718160 --- !u!1 &2973616090333718160
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -24719,11 +24719,21 @@ PrefabInstance:
propertyPath: Display propertyPath: Display
value: value:
objectReference: {fileID: 5727207770602245685} objectReference: {fileID: 5727207770602245685}
- target: {fileID: 6125707628839966529, guid: 558201eae20fa5540a826edb23937665,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6125707628839966535, guid: 558201eae20fa5540a826edb23937665, - target: {fileID: 6125707628839966535, guid: 558201eae20fa5540a826edb23937665,
type: 3} type: 3}
propertyPath: debugLayer.lightMeter.showCurves propertyPath: debugLayer.lightMeter.showCurves
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6125707628839966535, guid: 558201eae20fa5540a826edb23937665,
type: 3}
propertyPath: antialiasingMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6125707630481988370, guid: 558201eae20fa5540a826edb23937665, - target: {fileID: 6125707630481988370, guid: 558201eae20fa5540a826edb23937665,
type: 3} type: 3}
propertyPath: GameState propertyPath: GameState
@ -24941,7 +24951,7 @@ PrefabInstance:
- target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 5133887194504435357, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}
propertyPath: DisableOnStart propertyPath: DisableOnStart
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6166170817692975782, guid: 8cf3939d3cb6e684c8ac9618e68c8259, - target: {fileID: 6166170817692975782, guid: 8cf3939d3cb6e684c8ac9618e68c8259,
type: 3} type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ public class AudioMaster : MonoBehaviour {
Mixer.SetFloat("Ambient Volume", ConvertRatioToDecibel(Options.AmbientVolume)); Mixer.SetFloat("Ambient Volume", ConvertRatioToDecibel(Options.AmbientVolume));
Mixer.SetFloat("Footstep Volume", ConvertRatioToDecibel(Options.FootstepVolume)); Mixer.SetFloat("Footstep Volume", ConvertRatioToDecibel(Options.FootstepVolume));
Mixer.SetFloat("Diary Volume", ConvertRatioToDecibel(Options.DiaryVolume)); Mixer.SetFloat("Diary Volume", ConvertRatioToDecibel(Options.DiaryVolume));
Mixer.SetFloat("Teleport Volume", ConvertRatioToDecibel(Options.TeleportVolume));
} }
private float ConvertRatioToDecibel(float x) { private float ConvertRatioToDecibel(float x) {

View File

@ -4,4 +4,5 @@ using UnityEngine;
public class Burnable : MonoBehaviour { public class Burnable : MonoBehaviour {
public BurnQuality Quality; public BurnQuality Quality;
public bool BurningInCampfire = false;
} }

View File

@ -109,6 +109,7 @@ public class Campfire : MonoBehaviour {
NextLogTime = Time.time + Burnable.Quality.BurnTime; NextLogTime = Time.time + Burnable.Quality.BurnTime;
} }
LogQueue.Add(Burnable); LogQueue.Add(Burnable);
Burnable.BurningInCampfire = true;
} }
} }
} }
@ -116,8 +117,9 @@ public class Campfire : MonoBehaviour {
private void OnCollisionExit(Collision c) { private void OnCollisionExit(Collision c) {
if (c.collider.attachedRigidbody != null && c.collider.attachedRigidbody) { if (c.collider.attachedRigidbody != null && c.collider.attachedRigidbody) {
Burnable Burnable = c.collider.attachedRigidbody.GetComponent<Burnable>(); Burnable Burnable = c.collider.attachedRigidbody.GetComponent<Burnable>();
if (Burnable != null) { if (Burnable != null && LogQueue.Contains(Burnable)) {
LogQueue.Remove(Burnable); LogQueue.Remove(Burnable);
Burnable.BurningInCampfire = false;
} }
} }
} }

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(PickupStatus))]
public class CasettePickup : MonoBehaviour { public class CasettePickup : MonoBehaviour {
public AudioClip[] Clips; public AudioClip[] Clips;
public string DisplayPrompt { public string DisplayPrompt {
@ -15,17 +16,18 @@ public class CasettePickup : MonoBehaviour {
return Source.isPlaying; return Source.isPlaying;
} }
} }
public bool PickedUp = false;
private AudioSource Source; private AudioSource Source;
private PickupStatus Pickup;
private void Awake() { private void Awake() {
Source = GetComponent<AudioSource>(); Source = GetComponent<AudioSource>();
Pickup = GetComponent<PickupStatus>();
CasetteProgress.CasetteCount = Clips.Length; CasetteProgress.CasetteCount = Clips.Length;
} }
private void Update() { private void Update() {
if (PickedUp) { if (Pickup.Grabbed) {
transform.localScale = Vector3.Lerp(transform.localScale, Vector3.zero, 10f * Time.deltaTime); transform.localScale = Vector3.Lerp(transform.localScale, Vector3.zero, 10f * Time.deltaTime);
} }
@ -35,7 +37,7 @@ public class CasettePickup : MonoBehaviour {
} }
public void Play(CasettePickup previous) { public void Play(CasettePickup previous) {
PickedUp = true; Pickup.Grab();
int Index = CasetteProgress.PlayNext(); int Index = CasetteProgress.PlayNext();
if (Index != -1) { if (Index != -1) {
if (previous != null) { if (previous != null) {
@ -45,4 +47,10 @@ public class CasettePickup : MonoBehaviour {
CasetteProgress.CurrentlyPlaying = Source; CasetteProgress.CurrentlyPlaying = Source;
} }
} }
private static CasettePickup PreviousPickup = null;
public void PickupVR() {
Play(PreviousPickup);
PreviousPickup = this;
}
} }

View File

@ -0,0 +1,40 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR.InteractionSystem;
/**
* <summary>Enables the Throwable and Interactible components once the player comes close enough.</summary>
*/
public class InteractibleEnabler : MonoBehaviour {
public float Distance;
[Tooltip("True after the player has picked this thing up. Used to avoid glitches related to disabled Interactables when they're in use.")]
public bool PickedUp;
private Transform Player;
private Interactable Interactable;
private Throwable Throwable;
private float SqrDistance;
private void Awake() {
Player = GameObject.FindGameObjectWithTag("Player").transform;
Throwable = GetComponent<Throwable>();
Interactable = GetComponent<Interactable>();
Update();
}
private void Update() {
if (PickedUp) {
Throwable.enabled = true;
Interactable.enabled = true;
} else {
bool InRange = (Player.position - transform.position).magnitude < Distance;
Throwable.enabled = InRange;
Interactable.enabled = InRange;
}
}
public void Pickup() {
PickedUp = true;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6cecbf2dde7aad74e99c3fa1afac72ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,6 +4,7 @@ using UnityEngine;
[RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(Burnable))] [RequireComponent(typeof(Burnable))]
[RequireComponent(typeof(PickupStatus))]
public class Item : MonoBehaviour { public class Item : MonoBehaviour {
public Transform IgnitePoint; public Transform IgnitePoint;
public BurnQuality Quality { public BurnQuality Quality {
@ -12,9 +13,7 @@ public class Item : MonoBehaviour {
} }
} }
[Header("Runtime values")] private PickupStatus Pickup;
public bool Grabbed = false;
private Burnable Burnable; private Burnable Burnable;
private Rigidbody Body; private Rigidbody Body;
private Transform World; private Transform World;
@ -26,11 +25,12 @@ public class Item : MonoBehaviour {
private void Awake() { private void Awake() {
Burnable = GetComponent<Burnable>(); Burnable = GetComponent<Burnable>();
Body = GetComponent<Rigidbody>(); Body = GetComponent<Rigidbody>();
Pickup = GetComponent<PickupStatus>();
World = GameObject.FindGameObjectWithTag("World").transform; World = GameObject.FindGameObjectWithTag("World").transform;
} }
private void Update() { private void Update() {
if (Grabbed) { if (Pickup.Grabbed) {
transform.localPosition = Vector3.Lerp(transform.localPosition, GrabOffset, 10f * Time.deltaTime); transform.localPosition = Vector3.Lerp(transform.localPosition, GrabOffset, 10f * Time.deltaTime);
transform.localRotation = Quaternion.Slerp(transform.localRotation, GrabRotation, 10f * Time.deltaTime); transform.localRotation = Quaternion.Slerp(transform.localRotation, GrabRotation, 10f * Time.deltaTime);
} else if (BeingPlaced) { } else if (BeingPlaced) {
@ -53,13 +53,12 @@ public class Item : MonoBehaviour {
Vector3 DirectionOffset = new Vector3(Random.value - 0.5f, Random.value - 0.5f, 0) * 0.8f; Vector3 DirectionOffset = new Vector3(Random.value - 0.5f, Random.value - 0.5f, 0) * 0.8f;
GrabRotation = Quaternion.LookRotation(Vector3.down, (Vector3.forward + DirectionOffset).normalized); GrabRotation = Quaternion.LookRotation(Vector3.down, (Vector3.forward + DirectionOffset).normalized);
Body.isKinematic = true; Body.isKinematic = true;
Grabbed = true; Pickup.Grab();
} }
public void Drop(Vector3 where) { public void Drop(Vector3 where) {
transform.parent = World; transform.parent = World;
TargetPosition = where; TargetPosition = where;
BeingPlaced = true; BeingPlaced = true;
Grabbed = false;
} }
} }

View File

@ -20,6 +20,8 @@ public class ItemVR : MonoBehaviour {
public Light TorchLight; public Light TorchLight;
public Color WarnColor; public Color WarnColor;
public GameObject FireVolume; public GameObject FireVolume;
public AudioSource TorchSound;
public AudioClip[] FireClips;
[Header("Runtime values")] [Header("Runtime values")]
public float TorchFuel; public float TorchFuel;
@ -29,14 +31,20 @@ public class ItemVR : MonoBehaviour {
private float IgnitionStartTime = -1; private float IgnitionStartTime = -1;
private Color NormalColor; private Color NormalColor;
private Vector3 LastPosition;
private void Start() { private void Start() {
Burnable = GetComponent<Burnable>(); Burnable = GetComponent<Burnable>();
NormalColor = TorchLight.color; NormalColor = TorchLight.color;
TorchObject.SetActive(Ignited); TorchObject.SetActive(Ignited);
StickObject.SetActive(!Ignited); StickObject.SetActive(!Ignited);
LastPosition = transform.position;
} }
private void Update() { private void Update() {
Vector3 Velocity = transform.position - LastPosition;
LastPosition = transform.position;
if (Ignited && TorchLight.enabled) { if (Ignited && TorchLight.enabled) {
TorchFuel -= Time.deltaTime; TorchFuel -= Time.deltaTime;
if (TorchFuel < TorchWarnDuration) { if (TorchFuel < TorchWarnDuration) {
@ -44,6 +52,15 @@ public class ItemVR : MonoBehaviour {
} else { } else {
TorchLight.color = Color.Lerp(TorchLight.color, NormalColor, 5f * Time.deltaTime); TorchLight.color = Color.Lerp(TorchLight.color, NormalColor, 5f * Time.deltaTime);
} }
if ((TorchSound.clip.length - TorchSound.time) <= Time.deltaTime || !TorchSound.isPlaying) {
TorchSound.clip = FireClips[Random.Range(0, FireClips.Length)];
TorchSound.time = 0;
TorchSound.Play();
}
float FuelFactor = 1f / (Mathf.Max(0, TorchDuration + 0.5f - TorchFuel) * 4f + 1);
TorchSound.volume = 0.4f + 0.6f * FuelFactor - (TorchFuel < TorchWarnDuration ? 0.3f : 0);
if (TorchFuel <= 0) { if (TorchFuel <= 0) {
FireParticles.Stop(); FireParticles.Stop();
FireVolume.layer = gameObject.layer; FireVolume.layer = gameObject.layer;
@ -52,7 +69,7 @@ public class ItemVR : MonoBehaviour {
TorchLight.enabled = false; TorchLight.enabled = false;
} }
} }
} else if (!Ignited && IgnitionStartTime != -1 && Time.time - IgnitionStartTime >= IgniteDuration) { } else if (!Ignited && !Burnable.BurningInCampfire && IgnitionStartTime != -1 && Time.time - IgnitionStartTime >= IgniteDuration) {
Ignited = true; Ignited = true;
TorchFuel = TorchDuration; TorchFuel = TorchDuration;
TorchObject.SetActive(true); TorchObject.SetActive(true);

View File

@ -10,16 +10,18 @@ public class Options : MonoBehaviour {
public float AmbientVolume { get; set; } public float AmbientVolume { get; set; }
public float FootstepVolume { get; set; } public float FootstepVolume { get; set; }
public float DiaryVolume { get; set; } public float DiaryVolume { get; set; }
public float TeleportVolume { get; set; }
private void Awake() { private void Awake() {
InvertMouseX = false; InvertMouseX = false;
InvertMouseY = false; InvertMouseY = false;
CameraBobbing = true; CameraBobbing = true;
MouseSensitivity = 2f; MouseSensitivity = 2f;
MasterVolume = 0.3f; MasterVolume = 0.5f;
CampfireVolume = 1f; CampfireVolume = 1f;
AmbientVolume = 1f; AmbientVolume = 1f;
FootstepVolume = 1f; FootstepVolume = 1f;
DiaryVolume = 1f; DiaryVolume = 1f;
TeleportVolume = 0.1f;
} }
} }

View File

@ -0,0 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PickupStatus : MonoBehaviour {
public bool Grabbed = false;
public void Grab() {
Grabbed = true;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c56f91485b827a54282444c63a631645
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -18,9 +18,7 @@ public class StickSpawner : MonoBehaviour {
private float LastSpawn; private float LastSpawn;
private bool CanSpawnNew = true; private bool CanSpawnNew = true;
private bool LastSpawnedWasCasette = false; private PickupStatus SpawnedPickup;
private Item SpawnedStick = null;
private CasettePickup SpawnedCasette = null;
void Awake() { void Awake() {
Player = GameObject.FindGameObjectWithTag("Player"); Player = GameObject.FindGameObjectWithTag("Player");
@ -29,7 +27,7 @@ public class StickSpawner : MonoBehaviour {
void Update() { void Update() {
if (!CanSpawnNew) { if (!CanSpawnNew) {
if ((LastSpawnedWasCasette && (SpawnedCasette == null || SpawnedCasette.PickedUp)) || (!LastSpawnedWasCasette && SpawnedStick.Grabbed)) { if (SpawnedPickup == null || SpawnedPickup.Grabbed) {
CanSpawnNew = true; CanSpawnNew = true;
} else { } else {
return; return;
@ -47,18 +45,10 @@ public class StickSpawner : MonoBehaviour {
var SpawnedThing = StickPrefab; var SpawnedThing = StickPrefab;
if (Random.value <= CasetteChance) { if (Random.value <= CasetteChance) {
SpawnedThing = CasettePrefab; SpawnedThing = CasettePrefab;
LastSpawnedWasCasette = true;
} else {
LastSpawnedWasCasette = false;
} }
CanSpawnNew = false; CanSpawnNew = false;
var Spawned = GameObject.Instantiate(SpawnedThing, transform.position + Vector3.up * 2, Random.rotation); var Spawned = GameObject.Instantiate(SpawnedThing, transform.position + Vector3.up * 2, Random.rotation);
if (LastSpawnedWasCasette) { SpawnedPickup = Spawned.GetComponent<PickupStatus>();
SpawnedCasette = Spawned.GetComponent<CasettePickup>();
} else {
SpawnedStick = Spawned.GetComponent<Item>();
}
} }
} }
} }

View File

@ -1208,7 +1208,7 @@ namespace Valve.VR.InteractionSystem
} }
if (attachedInfo.interactable.attachEaseIn) if (attachedInfo.interactable != null && attachedInfo.interactable.attachEaseIn)
{ {
float t = Util.RemapNumberClamped(Time.time, attachedInfo.attachTime, attachedInfo.attachTime + attachedInfo.interactable.snapAttachEaseInTime, 0.0f, 1.0f); float t = Util.RemapNumberClamped(Time.time, attachedInfo.attachTime, attachedInfo.attachTime + attachedInfo.interactable.snapAttachEaseInTime, 0.0f, 1.0f);
if (t < 1.0f) if (t < 1.0f)