mirror of
https://github.com/ConjureETS/EscapeTheRoom.git
synced 2026-03-24 01:00:58 +00:00
Merge branch 'master' of https://github.com/ETSConjure/EscapeTheRoom
This commit is contained in:
commit
fd83088183
427
Assets/Prefabs/FirstPerson.prefab
Normal file
427
Assets/Prefabs/FirstPerson.prefab
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &112876
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 434624}
|
||||||
|
- 20: {fileID: 2061712}
|
||||||
|
- 92: {fileID: 9239602}
|
||||||
|
- 124: {fileID: 12479126}
|
||||||
|
- 81: {fileID: 8101620}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &117402
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 426836}
|
||||||
|
- 114: {fileID: 11453604}
|
||||||
|
- 143: {fileID: 14323870}
|
||||||
|
- 54: {fileID: 5492406}
|
||||||
|
- 82: {fileID: 8283000}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: FirstPerson
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &167304
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 422960}
|
||||||
|
- 82: {fileID: 8225872}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AudioSourceRespiration
|
||||||
|
m_TagString: AudioSourceBreath
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &422960
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 167304}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: .487160414, y: -.242959023, z: -5.49911785}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 426836}
|
||||||
|
m_RootOrder: 0
|
||||||
|
--- !u!4 &426836
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 117402}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -.469999999, y: 2.1099999, z: 2.48688507}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 422960}
|
||||||
|
- {fileID: 434624}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
--- !u!4 &434624
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 112876}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 426836}
|
||||||
|
m_RootOrder: 1
|
||||||
|
--- !u!20 &2061712
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 112876}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: .300000012
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: .0219999999
|
||||||
|
m_StereoMirrorMode: 0
|
||||||
|
--- !u!54 &5492406
|
||||||
|
Rigidbody:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 117402}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Mass: 1
|
||||||
|
m_Drag: 0
|
||||||
|
m_AngularDrag: .0500000007
|
||||||
|
m_UseGravity: 1
|
||||||
|
m_IsKinematic: 1
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
--- !u!81 &8101620
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 112876}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!82 &8225872
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 167304}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 0}
|
||||||
|
m_PlayOnAwake: 1
|
||||||
|
m_Volume: 1
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
--- !u!82 &8283000
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 117402}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 0}
|
||||||
|
m_PlayOnAwake: 1
|
||||||
|
m_Volume: 1
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
--- !u!92 &9239602
|
||||||
|
Behaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 112876}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!114 &11453604
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 117402}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4bcce75dab8f540b797340354c772d8b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IsWalking: 0
|
||||||
|
m_NbrAllumettes: 10
|
||||||
|
m_Briquets:
|
||||||
|
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
||||||
|
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
||||||
|
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
||||||
|
m_Allumettes: {fileID: 11455286, guid: bdd994d2c872c9e4d8601100f973be0d, type: 2}
|
||||||
|
m_WalkSpeed: 3
|
||||||
|
m_RunSpeed: 10
|
||||||
|
m_Stamina: 1000
|
||||||
|
m_RunstepLenghten: .699999988
|
||||||
|
m_JumpSpeed: 10
|
||||||
|
m_StickToGroundForce: 10
|
||||||
|
m_GravityMultiplier: 2
|
||||||
|
m_MouseLook:
|
||||||
|
XSensitivity: 2
|
||||||
|
YSensitivity: 2
|
||||||
|
clampVerticalRotation: 1
|
||||||
|
MinimumX: -90
|
||||||
|
MaximumX: 90
|
||||||
|
smooth: 0
|
||||||
|
smoothTime: 5
|
||||||
|
m_UseFovKick: 1
|
||||||
|
m_FovKick:
|
||||||
|
Camera: {fileID: 0}
|
||||||
|
originalFov: 0
|
||||||
|
FOVIncrease: 3
|
||||||
|
TimeToIncrease: 1
|
||||||
|
TimeToDecrease: 1
|
||||||
|
IncreaseCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve: []
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_UseHeadBob: 1
|
||||||
|
m_HeadBob:
|
||||||
|
HorizontalBobRange: .100000001
|
||||||
|
VerticalBobRange: .100000001
|
||||||
|
Bobcurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: .5
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: 1.5
|
||||||
|
value: -1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
- time: 2
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
VerticaltoHorizontalRatio: 1
|
||||||
|
m_JumpBob:
|
||||||
|
BobDuration: .200000003
|
||||||
|
BobAmount: .100000001
|
||||||
|
m_StepInterval: 5
|
||||||
|
m_FootstepSounds:
|
||||||
|
- {fileID: 8300000, guid: 42e65e088b3f4374e851b8dbd38f3df9, type: 3}
|
||||||
|
- {fileID: 8300000, guid: 8bc94ec6ed537e743b481638bdcd503d, type: 3}
|
||||||
|
m_JumpSound: {fileID: 8300000, guid: 5897aeed9b676024fbb8c694b421a861, type: 3}
|
||||||
|
m_LandSound: {fileID: 8300000, guid: 3b09d59f4499d45428baa7a21e954296, type: 3}
|
||||||
|
m_RespireSound: {fileID: 8300000, guid: 6336350fc2bc6e74185163c95a6485dc, type: 3}
|
||||||
|
m_NoStaminaSound: {fileID: 8300000, guid: 96ec8c58b35c5354e9d23061d25a23d6, type: 3}
|
||||||
|
--- !u!124 &12479126
|
||||||
|
Behaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 112876}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!143 &14323870
|
||||||
|
CharacterController:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 117402}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Height: 1.79999995
|
||||||
|
m_Radius: .5
|
||||||
|
m_SlopeLimit: 45
|
||||||
|
m_StepOffset: .300000012
|
||||||
|
m_SkinWidth: .0799999982
|
||||||
|
m_MinMoveDistance: 0
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 0}
|
||||||
|
propertyPath: m_TagString
|
||||||
|
value: AudioSourceBreath
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 117402}
|
||||||
|
m_IsPrefabParent: 1
|
||||||
8
Assets/Prefabs/FirstPerson.prefab.meta
Normal file
8
Assets/Prefabs/FirstPerson.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e180da7fedba0004086c3f44426d29c5
|
||||||
|
timeCreated: 1447000680
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -466,7 +466,7 @@ Prefab:
|
|||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -.185000002
|
value: -.114
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
@ -474,7 +474,7 @@ Prefab:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: -0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
- target: {fileID: 419770, guid: 69061867cac74f14badaa57b01070f97, type: 2}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
@ -1282,7 +1282,7 @@ Transform:
|
|||||||
m_PrefabParentObject: {fileID: 400056, guid: 4fed9d0bf3595254ba35890c3fd49728, type: 3}
|
m_PrefabParentObject: {fileID: 400056, guid: 4fed9d0bf3595254ba35890c3fd49728, type: 3}
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1416680805}
|
m_GameObject: {fileID: 1416680805}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: .469086319, z: 0, w: .883152306}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
|
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
|
||||||
m_Children:
|
m_Children:
|
||||||
@ -2202,8 +2202,8 @@ Transform:
|
|||||||
m_PrefabParentObject: {fileID: 0}
|
m_PrefabParentObject: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_PrefabInternal: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1925818716}
|
m_GameObject: {fileID: 1925818716}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 1, z: 0, w: -1.62920685e-07}
|
||||||
m_LocalPosition: {x: .75999999, y: -.709999979, z: 1.08000004}
|
m_LocalPosition: {x: .75999999, y: -.800000012, z: 1.08000004}
|
||||||
m_LocalScale: {x: .349999994, y: .5, z: .100000001}
|
m_LocalScale: {x: .349999994, y: .5, z: .100000001}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2142871351}
|
- {fileID: 2142871351}
|
||||||
|
|||||||
@ -127,310 +127,45 @@ Prefab:
|
|||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 3135019c33394eb4f917b222e3ecbddb, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 3135019c33394eb4f917b222e3ecbddb, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
--- !u!1 &1768239005
|
--- !u!1001 &2023543146
|
||||||
GameObject:
|
Prefab:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
serializedVersion: 2
|
||||||
m_PrefabInternal: {fileID: 0}
|
m_Modification:
|
||||||
serializedVersion: 4
|
m_TransformParent: {fileID: 0}
|
||||||
m_Component:
|
m_Modifications:
|
||||||
- 4: {fileID: 1768239006}
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
- 114: {fileID: 1768239010}
|
propertyPath: m_LocalPosition.x
|
||||||
- 143: {fileID: 1768239009}
|
value: -.469999999
|
||||||
- 54: {fileID: 1768239008}
|
objectReference: {fileID: 0}
|
||||||
- 82: {fileID: 1768239007}
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
m_Layer: 0
|
propertyPath: m_LocalPosition.y
|
||||||
m_Name: FirstPerson
|
value: 2.1099999
|
||||||
m_TagString: Untagged
|
objectReference: {fileID: 0}
|
||||||
m_Icon: {fileID: 0}
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
m_NavMeshLayer: 0
|
propertyPath: m_LocalPosition.z
|
||||||
m_StaticEditorFlags: 0
|
value: 2.48688507
|
||||||
m_IsActive: 1
|
objectReference: {fileID: 0}
|
||||||
--- !u!4 &1768239006
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
Transform:
|
propertyPath: m_LocalRotation.x
|
||||||
m_ObjectHideFlags: 0
|
value: 0
|
||||||
m_PrefabParentObject: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_PrefabInternal: {fileID: 0}
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
m_GameObject: {fileID: 1768239005}
|
propertyPath: m_LocalRotation.y
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
value: 0
|
||||||
m_LocalPosition: {x: 0, y: .545000017, z: -.409999996}
|
objectReference: {fileID: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
m_Children:
|
propertyPath: m_LocalRotation.z
|
||||||
- {fileID: 1945388283}
|
value: 0
|
||||||
m_Father: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RootOrder: 1
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
--- !u!82 &1768239007
|
propertyPath: m_LocalRotation.w
|
||||||
AudioSource:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1768239005}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 4
|
|
||||||
OutputAudioMixerGroup: {fileID: 0}
|
|
||||||
m_audioClip: {fileID: 0}
|
|
||||||
m_PlayOnAwake: 1
|
|
||||||
m_Volume: 1
|
|
||||||
m_Pitch: 1
|
|
||||||
Loop: 0
|
|
||||||
Mute: 0
|
|
||||||
Spatialize: 0
|
|
||||||
Priority: 128
|
|
||||||
DopplerLevel: 1
|
|
||||||
MinDistance: 1
|
|
||||||
MaxDistance: 500
|
|
||||||
Pan2D: 0
|
|
||||||
rolloffMode: 0
|
|
||||||
BypassEffects: 0
|
|
||||||
BypassListenerEffects: 0
|
|
||||||
BypassReverbZones: 0
|
|
||||||
rolloffCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- time: 0
|
|
||||||
value: 1
|
value: 1
|
||||||
inSlope: 0
|
objectReference: {fileID: 0}
|
||||||
outSlope: 0
|
- target: {fileID: 426836, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
tangentMode: 0
|
propertyPath: m_RootOrder
|
||||||
- time: 1
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
panLevelCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
spreadCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
reverbZoneMixCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- time: 0
|
|
||||||
value: 1
|
value: 1
|
||||||
inSlope: 0
|
objectReference: {fileID: 0}
|
||||||
outSlope: 0
|
m_RemovedComponents: []
|
||||||
tangentMode: 0
|
m_ParentPrefab: {fileID: 100100000, guid: e180da7fedba0004086c3f44426d29c5, type: 2}
|
||||||
m_PreInfinity: 2
|
m_IsPrefabParent: 0
|
||||||
m_PostInfinity: 2
|
|
||||||
--- !u!54 &1768239008
|
|
||||||
Rigidbody:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1768239005}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Mass: 1
|
|
||||||
m_Drag: 0
|
|
||||||
m_AngularDrag: .0500000007
|
|
||||||
m_UseGravity: 1
|
|
||||||
m_IsKinematic: 1
|
|
||||||
m_Interpolate: 0
|
|
||||||
m_Constraints: 0
|
|
||||||
m_CollisionDetection: 0
|
|
||||||
--- !u!143 &1768239009
|
|
||||||
CharacterController:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1768239005}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Height: 1.79999995
|
|
||||||
m_Radius: .5
|
|
||||||
m_SlopeLimit: 45
|
|
||||||
m_StepOffset: .300000012
|
|
||||||
m_SkinWidth: .0799999982
|
|
||||||
m_MinMoveDistance: 0
|
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &1768239010
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1768239005}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4bcce75dab8f540b797340354c772d8b, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_IsWalking: 0
|
|
||||||
m_NbrAllumettes: 10
|
|
||||||
m_Briquets:
|
|
||||||
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
|
||||||
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
|
||||||
- {fileID: 11418934, guid: 303650e9a23c68a42876df290e9d7537, type: 2}
|
|
||||||
m_Allumettes: {fileID: 11455286, guid: bdd994d2c872c9e4d8601100f973be0d, type: 2}
|
|
||||||
m_WalkSpeed: 0
|
|
||||||
m_RunSpeed: 0
|
|
||||||
m_Stamina: 1000
|
|
||||||
m_RunstepLenghten: 0
|
|
||||||
m_JumpSpeed: 0
|
|
||||||
m_StickToGroundForce: 0
|
|
||||||
m_GravityMultiplier: 0
|
|
||||||
m_MouseLook:
|
|
||||||
XSensitivity: 2
|
|
||||||
YSensitivity: 2
|
|
||||||
clampVerticalRotation: 1
|
|
||||||
MinimumX: -90
|
|
||||||
MaximumX: 90
|
|
||||||
smooth: 0
|
|
||||||
smoothTime: 5
|
|
||||||
m_UseFovKick: 0
|
|
||||||
m_FovKick:
|
|
||||||
Camera: {fileID: 0}
|
|
||||||
originalFov: 0
|
|
||||||
FOVIncrease: 3
|
|
||||||
TimeToIncrease: 1
|
|
||||||
TimeToDecrease: 1
|
|
||||||
IncreaseCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve: []
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
m_UseHeadBob: 0
|
|
||||||
m_HeadBob:
|
|
||||||
HorizontalBobRange: .330000013
|
|
||||||
VerticalBobRange: .330000013
|
|
||||||
Bobcurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
- time: .5
|
|
||||||
value: 1
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
- time: 1
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
- time: 1.5
|
|
||||||
value: -1
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
- time: 2
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
VerticaltoHorizontalRatio: 1
|
|
||||||
m_JumpBob:
|
|
||||||
BobDuration: 0
|
|
||||||
BobAmount: 0
|
|
||||||
m_StepInterval: 0
|
|
||||||
m_FootstepSounds: []
|
|
||||||
m_JumpSound: {fileID: 0}
|
|
||||||
m_LandSound: {fileID: 0}
|
|
||||||
--- !u!1 &1945388278
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
serializedVersion: 4
|
|
||||||
m_Component:
|
|
||||||
- 4: {fileID: 1945388283}
|
|
||||||
- 20: {fileID: 1945388282}
|
|
||||||
- 92: {fileID: 1945388281}
|
|
||||||
- 124: {fileID: 1945388280}
|
|
||||||
- 81: {fileID: 1945388279}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Main Camera
|
|
||||||
m_TagString: MainCamera
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!81 &1945388279
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1945388278}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!124 &1945388280
|
|
||||||
Behaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1945388278}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!92 &1945388281
|
|
||||||
Behaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1945388278}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!20 &1945388282
|
|
||||||
Camera:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1945388278}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ClearFlags: 1
|
|
||||||
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
|
|
||||||
m_NormalizedViewPortRect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 0
|
|
||||||
y: 0
|
|
||||||
width: 1
|
|
||||||
height: 1
|
|
||||||
near clip plane: .300000012
|
|
||||||
far clip plane: 1000
|
|
||||||
field of view: 60
|
|
||||||
orthographic: 0
|
|
||||||
orthographic size: 5
|
|
||||||
m_Depth: -1
|
|
||||||
m_CullingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
m_RenderingPath: -1
|
|
||||||
m_TargetTexture: {fileID: 0}
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
m_TargetEye: 3
|
|
||||||
m_HDR: 0
|
|
||||||
m_OcclusionCulling: 1
|
|
||||||
m_StereoConvergence: 10
|
|
||||||
m_StereoSeparation: .0219999999
|
|
||||||
m_StereoMirrorMode: 0
|
|
||||||
--- !u!4 &1945388283
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_PrefabParentObject: {fileID: 0}
|
|
||||||
m_PrefabInternal: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1945388278}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 1768239006}
|
|
||||||
m_RootOrder: 0
|
|
||||||
|
|||||||
@ -31,6 +31,8 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
[SerializeField] private AudioClip[] m_FootstepSounds; // an array of footstep sounds that will be randomly selected from.
|
[SerializeField] private AudioClip[] m_FootstepSounds; // an array of footstep sounds that will be randomly selected from.
|
||||||
[SerializeField] private AudioClip m_JumpSound; // the sound played when character leaves the ground.
|
[SerializeField] private AudioClip m_JumpSound; // the sound played when character leaves the ground.
|
||||||
[SerializeField] private AudioClip m_LandSound; // the sound played when character touches back on ground.
|
[SerializeField] private AudioClip m_LandSound; // the sound played when character touches back on ground.
|
||||||
|
[SerializeField] private AudioClip m_RespireSound; // the sound played when character touches back on ground.
|
||||||
|
[SerializeField] private AudioClip m_NoStaminaSound; // the sound played when character touches back on ground.
|
||||||
|
|
||||||
private Camera m_Camera;
|
private Camera m_Camera;
|
||||||
private bool m_Jump;
|
private bool m_Jump;
|
||||||
@ -47,6 +49,7 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
private float m_NextStep;
|
private float m_NextStep;
|
||||||
private bool m_Jumping;
|
private bool m_Jumping;
|
||||||
private AudioSource m_AudioSource;
|
private AudioSource m_AudioSource;
|
||||||
|
private AudioSource m_AudioSourceChild;
|
||||||
private MilesStonesPARA currentMilestone;
|
private MilesStonesPARA currentMilestone;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
@ -62,6 +65,7 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
m_NextStep = m_StepCycle/2f;
|
m_NextStep = m_StepCycle/2f;
|
||||||
m_Jumping = false;
|
m_Jumping = false;
|
||||||
m_AudioSource = GetComponent<AudioSource>();
|
m_AudioSource = GetComponent<AudioSource>();
|
||||||
|
m_AudioSourceChild = GameObject.FindGameObjectWithTag("AudioSourceBreath").GetComponent<AudioSource>();
|
||||||
m_MouseLook.Init(transform , m_Camera.transform);
|
m_MouseLook.Init(transform , m_Camera.transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,8 +102,46 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
m_AudioSource.Play();
|
m_AudioSource.Play();
|
||||||
m_NextStep = m_StepCycle + .5f;
|
m_NextStep = m_StepCycle + .5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PlayRespireSound()
|
||||||
|
{
|
||||||
|
bool changeSound;
|
||||||
|
if(Input.GetButton("StopRespire") && canSprint)
|
||||||
|
{
|
||||||
|
//Stopper la respiration et auguementer les sons
|
||||||
|
m_AudioSourceChild.volume -= 0.05f;
|
||||||
|
if(m_AudioSourceChild.volume <0)
|
||||||
|
m_AudioSourceChild.volume=0;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Repiration sounds
|
||||||
|
m_AudioSourceChild.volume += 0.3f;
|
||||||
|
if(m_AudioSourceChild.volume >1)
|
||||||
|
m_AudioSourceChild.volume=1;
|
||||||
|
}
|
||||||
|
if(m_Stamina < 100)
|
||||||
|
{
|
||||||
|
if(m_AudioSourceChild.clip == m_NoStaminaSound)
|
||||||
|
changeSound=false;
|
||||||
|
else
|
||||||
|
changeSound=true;
|
||||||
|
|
||||||
|
m_AudioSourceChild.clip = m_NoStaminaSound;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(m_AudioSourceChild.clip == m_RespireSound)
|
||||||
|
changeSound=false;
|
||||||
|
else
|
||||||
|
changeSound=true;
|
||||||
|
m_AudioSourceChild.clip = m_RespireSound;
|
||||||
|
}
|
||||||
|
if(changeSound || !m_AudioSourceChild.isPlaying)
|
||||||
|
m_AudioSourceChild.Play();
|
||||||
|
m_NextStep = m_StepCycle + .5f;
|
||||||
|
}
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
float speed;
|
float speed;
|
||||||
@ -115,7 +157,8 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
|
|
||||||
m_MoveDir.x = desiredMove.x*speed;
|
m_MoveDir.x = desiredMove.x*speed;
|
||||||
m_MoveDir.z = desiredMove.z*speed;
|
m_MoveDir.z = desiredMove.z*speed;
|
||||||
|
|
||||||
|
PlayRespireSound();
|
||||||
//Actions joueur
|
//Actions joueur
|
||||||
if(Input.GetButton("Briquet"))
|
if(Input.GetButton("Briquet"))
|
||||||
{
|
{
|
||||||
@ -182,14 +225,6 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
m_NbrAllumettes--;
|
m_NbrAllumettes--;
|
||||||
DestroyObject(GameObject.FindGameObjectWithTag("Allumettes"));
|
DestroyObject(GameObject.FindGameObjectWithTag("Allumettes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Input.GetButton("StopRespire"))
|
|
||||||
//Stopper la respiration et auguementer les sons
|
|
||||||
print("yo2");
|
|
||||||
else
|
|
||||||
//Repiration sounds
|
|
||||||
print("yo3");
|
|
||||||
|
|
||||||
if (m_CharacterController.isGrounded)
|
if (m_CharacterController.isGrounded)
|
||||||
{
|
{
|
||||||
m_MoveDir.y = -m_StickToGroundForce;
|
m_MoveDir.y = -m_StickToGroundForce;
|
||||||
@ -293,7 +328,7 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
// keep track of whether or not the character is walking or running
|
// keep track of whether or not the character is walking or running
|
||||||
m_IsWalking = !CrossPlatformInputManager.GetButton("Course");
|
m_IsWalking = !CrossPlatformInputManager.GetButton("Course");
|
||||||
//Si le joueur marche. Il reprend de l'énergie
|
//Si le joueur marche. Il reprend de l'énergie
|
||||||
if(m_IsWalking)
|
if(m_IsWalking && !Input.GetButton("StopRespire"))
|
||||||
{
|
{
|
||||||
m_Stamina += 5;
|
m_Stamina += 5;
|
||||||
if(m_Stamina >= 500)
|
if(m_Stamina >= 500)
|
||||||
@ -302,7 +337,7 @@ namespace UnityStandardAssets.Characters.FirstPerson
|
|||||||
m_Stamina = 1000;
|
m_Stamina = 1000;
|
||||||
}
|
}
|
||||||
//Sinon il court, mais il perd de l'énergie
|
//Sinon il court, mais il perd de l'énergie
|
||||||
else
|
else if(!m_IsWalking || Input.GetButton("StopRespire"))
|
||||||
{
|
{
|
||||||
m_Stamina -= 10;
|
m_Stamina -= 10;
|
||||||
if(m_Stamina < 0)
|
if(m_Stamina < 0)
|
||||||
|
|||||||
@ -13,8 +13,6 @@ public class FlickeringLight : MonoBehaviour
|
|||||||
float range = MaxIntensity - MinIntensity;
|
float range = MaxIntensity - MinIntensity;
|
||||||
float AverageIntensity = MinIntensity + range / 2;
|
float AverageIntensity = MinIntensity + range / 2;
|
||||||
|
|
||||||
Debug.Log(Mathf.Sin(Time.timeSinceLevelLoad));
|
|
||||||
|
|
||||||
PointLight.intensity = Random.Range(MinIntensity, MaxIntensity);
|
PointLight.intensity = Random.Range(MinIntensity, MaxIntensity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
Assets/Sound.meta
Normal file
9
Assets/Sound.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e2839cc8e19d8dc4098d710783dbac88
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1446922484
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sound/essoufflement-1.mp3
Normal file
BIN
Assets/Sound/essoufflement-1.mp3
Normal file
Binary file not shown.
22
Assets/Sound/essoufflement-1.mp3.meta
Normal file
22
Assets/Sound/essoufflement-1.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 96ec8c58b35c5354e9d23061d25a23d6
|
||||||
|
timeCreated: 1446999672
|
||||||
|
licenseType: Free
|
||||||
|
AudioImporter:
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Sound/respire.mp3
Normal file
BIN
Assets/Sound/respire.mp3
Normal file
Binary file not shown.
22
Assets/Sound/respire.mp3.meta
Normal file
22
Assets/Sound/respire.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9645d3b6fddbdd44387c0d6996512b2a
|
||||||
|
timeCreated: 1447002560
|
||||||
|
licenseType: Free
|
||||||
|
AudioImporter:
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,257 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityStandardAssets.CrossPlatformInput;
|
||||||
|
using UnityStandardAssets.Utility;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
namespace UnityStandardAssets.Characters.FirstPerson
|
||||||
|
{
|
||||||
|
[RequireComponent(typeof (CharacterController))]
|
||||||
|
[RequireComponent(typeof (AudioSource))]
|
||||||
|
public class FirstPersonController : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private bool m_IsWalking;
|
||||||
|
[SerializeField] private float m_WalkSpeed;
|
||||||
|
[SerializeField] private float m_RunSpeed;
|
||||||
|
[SerializeField] [Range(0f, 1f)] private float m_RunstepLenghten;
|
||||||
|
[SerializeField] private float m_JumpSpeed;
|
||||||
|
[SerializeField] private float m_StickToGroundForce;
|
||||||
|
[SerializeField] private float m_GravityMultiplier;
|
||||||
|
[SerializeField] private MouseLook m_MouseLook;
|
||||||
|
[SerializeField] private bool m_UseFovKick;
|
||||||
|
[SerializeField] private FOVKick m_FovKick = new FOVKick();
|
||||||
|
[SerializeField] private bool m_UseHeadBob;
|
||||||
|
[SerializeField] private CurveControlledBob m_HeadBob = new CurveControlledBob();
|
||||||
|
[SerializeField] private LerpControlledBob m_JumpBob = new LerpControlledBob();
|
||||||
|
[SerializeField] private float m_StepInterval;
|
||||||
|
[SerializeField] private AudioClip[] m_FootstepSounds; // an array of footstep sounds that will be randomly selected from.
|
||||||
|
[SerializeField] private AudioClip m_JumpSound; // the sound played when character leaves the ground.
|
||||||
|
[SerializeField] private AudioClip m_LandSound; // the sound played when character touches back on ground.
|
||||||
|
|
||||||
|
private Camera m_Camera;
|
||||||
|
private bool m_Jump;
|
||||||
|
private float m_YRotation;
|
||||||
|
private Vector2 m_Input;
|
||||||
|
private Vector3 m_MoveDir = Vector3.zero;
|
||||||
|
private CharacterController m_CharacterController;
|
||||||
|
private CollisionFlags m_CollisionFlags;
|
||||||
|
private bool m_PreviouslyGrounded;
|
||||||
|
private Vector3 m_OriginalCameraPosition;
|
||||||
|
private float m_StepCycle;
|
||||||
|
private float m_NextStep;
|
||||||
|
private bool m_Jumping;
|
||||||
|
private AudioSource m_AudioSource;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
m_CharacterController = GetComponent<CharacterController>();
|
||||||
|
m_Camera = Camera.main;
|
||||||
|
m_OriginalCameraPosition = m_Camera.transform.localPosition;
|
||||||
|
m_FovKick.Setup(m_Camera);
|
||||||
|
m_HeadBob.Setup(m_Camera, m_StepInterval);
|
||||||
|
m_StepCycle = 0f;
|
||||||
|
m_NextStep = m_StepCycle/2f;
|
||||||
|
m_Jumping = false;
|
||||||
|
m_AudioSource = GetComponent<AudioSource>();
|
||||||
|
m_MouseLook.Init(transform , m_Camera.transform);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
RotateView();
|
||||||
|
// the jump state needs to read here to make sure it is not missed
|
||||||
|
if (!m_Jump)
|
||||||
|
{
|
||||||
|
m_Jump = CrossPlatformInputManager.GetButtonDown("Jump");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_PreviouslyGrounded && m_CharacterController.isGrounded)
|
||||||
|
{
|
||||||
|
StartCoroutine(m_JumpBob.DoBobCycle());
|
||||||
|
PlayLandingSound();
|
||||||
|
m_MoveDir.y = 0f;
|
||||||
|
m_Jumping = false;
|
||||||
|
}
|
||||||
|
if (!m_CharacterController.isGrounded && !m_Jumping && m_PreviouslyGrounded)
|
||||||
|
{
|
||||||
|
m_MoveDir.y = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_PreviouslyGrounded = m_CharacterController.isGrounded;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void PlayLandingSound()
|
||||||
|
{
|
||||||
|
m_AudioSource.clip = m_LandSound;
|
||||||
|
m_AudioSource.Play();
|
||||||
|
m_NextStep = m_StepCycle + .5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
float speed;
|
||||||
|
GetInput(out speed);
|
||||||
|
// always move along the camera forward as it is the direction that it being aimed at
|
||||||
|
Vector3 desiredMove = transform.forward*m_Input.y + transform.right*m_Input.x;
|
||||||
|
|
||||||
|
// get a normal for the surface that is being touched to move along it
|
||||||
|
RaycastHit hitInfo;
|
||||||
|
Physics.SphereCast(transform.position, m_CharacterController.radius, Vector3.down, out hitInfo,
|
||||||
|
m_CharacterController.height/2f);
|
||||||
|
desiredMove = Vector3.ProjectOnPlane(desiredMove, hitInfo.normal).normalized;
|
||||||
|
|
||||||
|
m_MoveDir.x = desiredMove.x*speed;
|
||||||
|
m_MoveDir.z = desiredMove.z*speed;
|
||||||
|
|
||||||
|
|
||||||
|
if (m_CharacterController.isGrounded)
|
||||||
|
{
|
||||||
|
m_MoveDir.y = -m_StickToGroundForce;
|
||||||
|
|
||||||
|
if (m_Jump)
|
||||||
|
{
|
||||||
|
m_MoveDir.y = m_JumpSpeed;
|
||||||
|
PlayJumpSound();
|
||||||
|
m_Jump = false;
|
||||||
|
m_Jumping = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_MoveDir += Physics.gravity*m_GravityMultiplier*Time.fixedDeltaTime;
|
||||||
|
}
|
||||||
|
m_CollisionFlags = m_CharacterController.Move(m_MoveDir*Time.fixedDeltaTime);
|
||||||
|
|
||||||
|
ProgressStepCycle(speed);
|
||||||
|
UpdateCameraPosition(speed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void PlayJumpSound()
|
||||||
|
{
|
||||||
|
m_AudioSource.clip = m_JumpSound;
|
||||||
|
m_AudioSource.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void ProgressStepCycle(float speed)
|
||||||
|
{
|
||||||
|
if (m_CharacterController.velocity.sqrMagnitude > 0 && (m_Input.x != 0 || m_Input.y != 0))
|
||||||
|
{
|
||||||
|
m_StepCycle += (m_CharacterController.velocity.magnitude + (speed*(m_IsWalking ? 1f : m_RunstepLenghten)))*
|
||||||
|
Time.fixedDeltaTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(m_StepCycle > m_NextStep))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_NextStep = m_StepCycle + m_StepInterval;
|
||||||
|
|
||||||
|
PlayFootStepAudio();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void PlayFootStepAudio()
|
||||||
|
{
|
||||||
|
if (!m_CharacterController.isGrounded)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// pick & play a random footstep sound from the array,
|
||||||
|
// excluding sound at index 0
|
||||||
|
int n = Random.Range(1, m_FootstepSounds.Length);
|
||||||
|
m_AudioSource.clip = m_FootstepSounds[n];
|
||||||
|
m_AudioSource.PlayOneShot(m_AudioSource.clip);
|
||||||
|
// move picked sound to index 0 so it's not picked next time
|
||||||
|
m_FootstepSounds[n] = m_FootstepSounds[0];
|
||||||
|
m_FootstepSounds[0] = m_AudioSource.clip;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void UpdateCameraPosition(float speed)
|
||||||
|
{
|
||||||
|
Vector3 newCameraPosition;
|
||||||
|
if (!m_UseHeadBob)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m_CharacterController.velocity.magnitude > 0 && m_CharacterController.isGrounded)
|
||||||
|
{
|
||||||
|
m_Camera.transform.localPosition =
|
||||||
|
m_HeadBob.DoHeadBob(m_CharacterController.velocity.magnitude +
|
||||||
|
(speed*(m_IsWalking ? 1f : m_RunstepLenghten)));
|
||||||
|
newCameraPosition = m_Camera.transform.localPosition;
|
||||||
|
newCameraPosition.y = m_Camera.transform.localPosition.y - m_JumpBob.Offset();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newCameraPosition = m_Camera.transform.localPosition;
|
||||||
|
newCameraPosition.y = m_OriginalCameraPosition.y - m_JumpBob.Offset();
|
||||||
|
}
|
||||||
|
m_Camera.transform.localPosition = newCameraPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void GetInput(out float speed)
|
||||||
|
{
|
||||||
|
// Read input
|
||||||
|
float horizontal = CrossPlatformInputManager.GetAxis("Horizontal");
|
||||||
|
float vertical = CrossPlatformInputManager.GetAxis("Vertical");
|
||||||
|
|
||||||
|
bool waswalking = m_IsWalking;
|
||||||
|
|
||||||
|
#if !MOBILE_INPUT
|
||||||
|
// On standalone builds, walk/run speed is modified by a key press.
|
||||||
|
// keep track of whether or not the character is walking or running
|
||||||
|
m_IsWalking = !Input.GetKey(KeyCode.LeftShift);
|
||||||
|
#endif
|
||||||
|
// set the desired speed to be walking or running
|
||||||
|
speed = m_IsWalking ? m_WalkSpeed : m_RunSpeed;
|
||||||
|
m_Input = new Vector2(horizontal, vertical);
|
||||||
|
|
||||||
|
// normalize input if it exceeds 1 in combined length:
|
||||||
|
if (m_Input.sqrMagnitude > 1)
|
||||||
|
{
|
||||||
|
m_Input.Normalize();
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle speed change to give an fov kick
|
||||||
|
// only if the player is going to a run, is running and the fovkick is to be used
|
||||||
|
if (m_IsWalking != waswalking && m_UseFovKick && m_CharacterController.velocity.sqrMagnitude > 0)
|
||||||
|
{
|
||||||
|
StopAllCoroutines();
|
||||||
|
StartCoroutine(!m_IsWalking ? m_FovKick.FOVKickUp() : m_FovKick.FOVKickDown());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void RotateView()
|
||||||
|
{
|
||||||
|
m_MouseLook.LookRotation (transform, m_Camera.transform);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void OnControllerColliderHit(ControllerColliderHit hit)
|
||||||
|
{
|
||||||
|
Rigidbody body = hit.collider.attachedRigidbody;
|
||||||
|
//dont move the rigidbody if the character is on top of it
|
||||||
|
if (m_CollisionFlags == CollisionFlags.Below)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (body == null || body.isKinematic)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
body.AddForceAtPosition(m_CharacterController.velocity*0.1f, hit.point, ForceMode.Impulse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 05ec5cf00ca181d45a42ba1870e148c3
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
7
Assets/Standard Assets/Characters/PhysicsMaterials.meta
Normal file
7
Assets/Standard Assets/Characters/PhysicsMaterials.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea2a5216ffb8d4b319d09e8d7782120c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -235,7 +235,7 @@ InputManager:
|
|||||||
descriptiveNegativeName:
|
descriptiveNegativeName:
|
||||||
negativeButton:
|
negativeButton:
|
||||||
positiveButton: joystick button 9
|
positiveButton: joystick button 9
|
||||||
altNegativeButton: space
|
altNegativeButton: c
|
||||||
altPositiveButton:
|
altPositiveButton:
|
||||||
gravity: 1000
|
gravity: 1000
|
||||||
dead: .00100000005
|
dead: .00100000005
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 5.2.0f3
|
m_EditorVersion: 5.2.2f1
|
||||||
m_StandardAssetsVersion: 0
|
m_StandardAssetsVersion: 0
|
||||||
|
|||||||
@ -5,6 +5,10 @@ TagManager:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
tags:
|
tags:
|
||||||
- Trap
|
- Trap
|
||||||
|
- Briquet
|
||||||
|
- MilesStones
|
||||||
|
- Allumettes
|
||||||
|
- AudioSourceBreath
|
||||||
layers:
|
layers:
|
||||||
- Default
|
- Default
|
||||||
- TransparentFX
|
- TransparentFX
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user