浏览代码
Add camera shake on protagonist hit. (#454)
Add camera shake on protagonist hit. (#454)
* Add camera shake on protagonist hit. * add cam shake on critters hit/main
GitHub
3 年前
当前提交
9fd51f47
共有 13 个文件被更改,包括 199 次插入 和 0 次删除
-
93UOP1_Project/Assets/Prefabs/Gameplay/CameraSystem.prefab
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/PlantCritter/States/GettingHit.asset
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Critters/SlimeRockCritter/States/GettingHit.asset
-
1UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/States/GettingHit.asset
-
6UOP1_Project/Assets/Scripts/Camera/CameraManager.cs
-
8UOP1_Project/Assets/ScriptableObjects/Events/Camera.meta
-
15UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ShakeCamAction.asset
-
8UOP1_Project/Assets/ScriptableObjects/StateMachine/Protagonist/Actions/ShakeCamAction.asset.meta
-
32UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs
-
11UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs.meta
-
15UOP1_Project/Assets/ScriptableObjects/Events/Camera/CameraShakeEvent.asset
-
8UOP1_Project/Assets/ScriptableObjects/Events/Camera/CameraShakeEvent.asset.meta
|
|||
fileFormatVersion: 2 |
|||
guid: 1a2c17490504c5c4a909bdf1fdf956c8 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 63a903051ce61cb45a169b9074844fa9, type: 3} |
|||
m_Name: ShakeCamAction |
|||
m_EditorClassIdentifier: |
|||
camShakeEvent: {fileID: 11400000, guid: 3d8e5223e1e74274cbb375151106b21e, type: 2} |
|
|||
fileFormatVersion: 2 |
|||
guid: 45574b5ff344b8649b0749f764ad00af |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UOP1.StateMachine; |
|||
using UOP1.StateMachine.ScriptableObjects; |
|||
|
|||
[CreateAssetMenu(fileName = "ShakeCamAction", menuName = "State Machines/Actions/Shake Cam Action")] |
|||
public class ShakeCamActionSO : StateActionSO |
|||
{ |
|||
public VoidEventChannelSO camShakeEvent; |
|||
protected override StateAction CreateAction() => new ShakeCamAction(); |
|||
} |
|||
|
|||
public class ShakeCamAction : StateAction |
|||
{ |
|||
protected new ShakeCamActionSO OriginSO => (ShakeCamActionSO)base.OriginSO; |
|||
|
|||
public override void Awake(StateMachine stateMachine) |
|||
{ |
|||
} |
|||
|
|||
public override void OnUpdate() |
|||
{ |
|||
} |
|||
|
|||
public override void OnStateEnter() |
|||
{ |
|||
OriginSO.camShakeEvent.RaiseEvent(); |
|||
} |
|||
|
|||
public override void OnStateExit() |
|||
{ |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 63a903051ce61cb45a169b9074844fa9 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 7fafac715ff920c4383fed91a38a351e, type: 3} |
|||
m_Name: CameraShakeEvent |
|||
m_EditorClassIdentifier: |
|||
description: Event used to fire camera shake |
|
|||
fileFormatVersion: 2 |
|||
guid: 3d8e5223e1e74274cbb375151106b21e |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue