浏览代码

More tweaks to CC

/main
Ciro Continisio 4 年前
当前提交
5b2ff381
共有 6 个文件被更改,包括 207 次插入229 次删除
  1. 224
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  2. 168
      UOP1_Project/Assets/Scenes/WIP/TestingGround_Small.unity
  3. 3
      UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Sliding.asset
  4. 7
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  5. 7
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs
  6. 27
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs

224
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab


gameplayCameraTransform: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
_openInventoryChannel: {fileID: 0}
ray1: {fileID: 5986570136067168862}
ray2: {fileID: 6950735986475152375}
ray3: {fileID: 6171081068863781697}
canMoveForward: 0
--- !u!114 &6243045328629046901
MonoBehaviour:
m_ObjectHideFlags: 0

m_Father: {fileID: 7980046698497209273}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2404603671596265661
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6950735986475152375}
m_Layer: 0
m_Name: Ray (2)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6950735986475152375
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2404603671596265661}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0.242, y: 0.2954, z: -0.144}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2561880875395320411
GameObject:
m_ObjectHideFlags: 0

_layers:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &3716520544714381952
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5986570136067168862}
m_Layer: 0
m_Name: Ray (1)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5986570136067168862
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3716520544714381952}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0, y: 0.15, z: 0.3}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4068522191893200351
GameObject:
m_ObjectHideFlags: 0

m_MaintainTargetRotationOffset: 0
m_SourceObjectsGUIToggle: 1
m_SettingsGUIToggle: 1
--- !u!1 &5628147311454600911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6171081068863781697}
m_Layer: 0
m_Name: Ray (3)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6171081068863781697
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5628147311454600911}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: -0.207, y: 0.2954, z: -0.199}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6174286042992265391
GameObject:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c478a391cfbc4b74ebda3f9a57283705, type: 3}
--- !u!4 &9124457888259134664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -707639030120515232, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3618315963565927926 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4232177642318348382, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &985740358872296520 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 370260214279946720, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6915316659346450001 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6302017792269552633, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1923828950100165288 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -7908408724013584640, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5715074524044649684 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5178407201426131324, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5745820188237013370 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4093735697823429422, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6283366920650448094 stripped
--- !u!4 &5700738674217691736 stripped
m_CorrespondingSourceObject: {fileID: -2324313729559432842, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8613994902604584134 stripped
--- !u!4 &2153411342994507478 stripped
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 1544475338635520894, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5700738674217691736 stripped
--- !u!4 &8613994902604584134 stripped
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6283366920650448094 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2324313729559432842, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &7646398735186508214 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2121169907620178914, guid: c478a391cfbc4b74ebda3f9a57283705,

--- !u!4 &928224351994020785 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 318866306700684825, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2153411342994507478 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1544475338635520894, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9124457888259134664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -707639030120515232, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3618315963565927926 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4232177642318348382, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &985740358872296520 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 370260214279946720, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6915316659346450001 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6302017792269552633, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1923828950100165288 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -7908408724013584640, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5715074524044649684 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5178407201426131324, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2046901735864851427
PrefabInstance:
m_ObjectHideFlags: 0

propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6881708490215676357, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
--- !u!4 &3583992150622067535 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3346050453518178618, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3583992150622067535 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3346050453518178618, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a75f6395e1487b344a0ffafad66fc95a, type: 3}
--- !u!4 &5633354469276786070 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5633354469276786070 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}

type: 3}
propertyPath: m_Name
value: LandingParticle
objectReference: {fileID: 0}
- target: {fileID: 8525369151793231701, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9, type: 3}

168
UOP1_Project/Assets/Scenes/WIP/TestingGround_Small.unity


m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 14
value: 25
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &84017748 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 84017747}
m_PrefabAsset: {fileID: 0}
--- !u!1 &88321866
GameObject:
m_ObjectHideFlags: 0

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 19
value: 30
value: 1.4379467
value: 1.4379466
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &218741864 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 218741863}
m_PrefabAsset: {fileID: 0}
--- !u!1 &242133391
GameObject:
m_ObjectHideFlags: 0

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 18
value: 29
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &314637022 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 314637021}
m_PrefabAsset: {fileID: 0}
--- !u!1 &314708499
GameObject:
m_ObjectHideFlags: 0

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 12
value: 23
value: 1.9128753
value: 1.9128752
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.9128753
value: 1.9128755
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &317723836 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 317723835}
m_PrefabAsset: {fileID: 0}
--- !u!1 &374755181
GameObject:
m_ObjectHideFlags: 0

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 13
value: 24
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &630095068 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 630095067}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &670201581
PrefabInstance:
m_ObjectHideFlags: 0

- {fileID: 1528032390}
- {fileID: 1570317830}
- {fileID: 676138020}
- {fileID: 317723836}
- {fileID: 630095068}
- {fileID: 84017748}
- {fileID: 1965089119}
- {fileID: 1656028186}
- {fileID: 1916692732}
- {fileID: 314637022}
- {fileID: 218741864}
- {fileID: 1876773642}
- {fileID: 1361120324}
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 21
value: 32
value: 2.355899
value: 2.3558993
value: 2.355899
value: 2.3558993
value: 2.355899
value: 2.3558993
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &1361120324 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 1361120323}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1366387105
GameObject:
m_ObjectHideFlags: 0

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 16
value: 27
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &1656028186 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 1656028185}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1810604289
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 463132372906762298, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_FollowOffset.y
value: 3.447653
value: 4.254561
value: -8.062856
value: -8.707626
value: 3.447653
value: 4.254561
value: -8.062856
value: -8.707626
objectReference: {fileID: 0}
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99014306
value: 0.98891133
value: 0.10518894
value: 0.116199404
value: -0.089102894
value: -0.08882192
value: 0.024754735
value: 0.025744611
objectReference: {fileID: 0}
- target: {fileID: 1990950152470473449, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 2678045054851453813, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_FollowOffset.y
value: 3.447653
value: 4.254561
value: -8.062856
value: -8.707626
objectReference: {fileID: 0}
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 8745341642014614482, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.98230267
value: 0.98015785
value: 0.18730068
value: 0.19821881
value: -0.000000039006572
value: 1.4378575e-17
value: 0.000000007437584
value: -2.9078008e-18
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 45632f0a227c860489bcba0eb1f4ec3e, type: 3}

m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 20
value: 31
value: 1.4379467
value: 1.4379466
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &1876773642 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 1876773641}
m_PrefabAsset: {fileID: 0}
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 17
value: 28
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &1916692732 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 1916692731}
m_PrefabAsset: {fileID: 0}
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1343018183}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 15
value: 26
value: 1.4379467
value: 1.4379468
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!4 &1965089119 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
m_PrefabInstance: {fileID: 1965089118}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2040702399
GameObject:
m_ObjectHideFlags: 0

3
UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/Sliding.asset


- {fileID: 11400000, guid: c0d0573a78e4c6245ab9676e7af35880, type: 2}
- {fileID: 11400000, guid: 9e558dc250163db40a4e1f7241ee15c2, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: bcf4edc006209d54da9cd4c18329bb43, type: 2}
- {fileID: 11400000, guid: bd85c54d16eb60c4c99504f1679af851, type: 2}
- {fileID: 11400000, guid: 47d9da417e68970419335f80f4395239, type: 2}
- {fileID: 11400000, guid: 4badb7afa3370ba4d8a229584c5c744f, type: 2}

7
UOP1_Project/Assets/Scripts/Characters/Protagonist.cs


[NonSerialized] public Vector3 movementInput; //Initial input coming from the Protagonist script
[NonSerialized] public Vector3 movementVector; //Final movement vector, manipulated by the StateMachine actions
[NonSerialized] public ControllerColliderHit lastHit;
[NonSerialized] public Vector3 stepNormal = Vector3.up;
[NonSerialized] public Vector3 spherecastGroundNormal = Vector3.up;
[NonSerialized] public bool isRunning; // Used when using the keyboard to run, brings the normalised speed to 1
public const float GRAVITY_MULTIPLIER = 5f;

public const float GRAVITY_DIVIDER = .6f;
public const float AIR_RESISTANCE = 5f;
public Transform ray1, ray2, ray3; //Temporary references
public bool canMoveForward;
private void OnControllerColliderHit(ControllerColliderHit hit)
{

private void GroundCheck()
{
canMoveForward = !Physics.Raycast(ray1.position, transform.forward, out RaycastHit hitResults, .2f);
}
private void RecalculateMovement()

7
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/SlideActionSO.cs


public override void OnUpdate()
{
float speed = -Physics.gravity.y * Protagonist.GRAVITY_MULTIPLIER * .3f;
float speed = -Physics.gravity.y * Protagonist.GRAVITY_MULTIPLIER * .4f;
//Trick below has been commented because it was pushing the character "into" the ground much too often,
//producing a collision, which would result in the character being stuck while in the Sliding state
//Vector3 slidingMovement = _protagonist.movementVector;
//// Cheap way to avoid overshooting the character, which causes it to move away from the slope

//slidingMovement += slideDirection * speed;
_protagonist.movementVector = slideDirection * speed * -slideDirection.y;
_protagonist.movementVector = slideDirection * speed;
}
}

27
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs


protected override bool Statement()
{
float stepHeight = _protagonistScript.lastHit.point.y - _protagonistScript.transform.position.y;
bool isWalkableStep = stepHeight <= _characterController.stepOffset;
Vector3 lastHitProj = _protagonistScript.lastHit.point;
lastHitProj.y = 0f;
float currentSlope = Vector3.Angle(Vector3.up, _protagonistScript.lastHit.normal);
bool isSlopeTooSteep = currentSlope >= _characterController.slopeLimit;
if (_protagonistScript.canMoveForward)
if (!isSlopeTooSteep)
float isForward = Vector3.Dot(_protagonistScript.transform.forward, lastHitProj.normalized);
if (isForward >= .9f)
{
return false;
}
else
{
float slope = Vector3.Angle(Vector3.up, _protagonistScript.lastHit.normal);
return slope >= _characterController.slopeLimit;
}
//Pendence is within slope limits
return false;
float slope = Vector3.Angle(Vector3.up, _protagonistScript.lastHit.normal);
return slope >= _characterController.slopeLimit;
//If the slope is too steep, we prevent sliding if it's within the step limit
return !isWalkableStep;
}
}
}
正在加载...
取消
保存