triggers for freeze sfx & vfx
This commit is contained in:
parent
6ec3f5f99b
commit
a669c02858
|
@ -30,7 +30,7 @@ MonoBehaviour:
|
||||||
m_AdvancedMode: 0
|
m_AdvancedMode: 0
|
||||||
threshold:
|
threshold:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0.6
|
m_Value: 0.75
|
||||||
min: 0
|
min: 0
|
||||||
intensity:
|
intensity:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
|
|
|
@ -171,6 +171,8 @@ MonoBehaviour:
|
||||||
frozenTime: {fileID: 11400000, guid: 19273ba4ac237ab4381926cfb195dda8, type: 2}
|
frozenTime: {fileID: 11400000, guid: 19273ba4ac237ab4381926cfb195dda8, type: 2}
|
||||||
_dialogueSystem: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2}
|
_dialogueSystem: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2}
|
||||||
_freezeFirstUseDialogueKey: SD_FREEZE_0
|
_freezeFirstUseDialogueKey: SD_FREEZE_0
|
||||||
|
_freezeVfx: {fileID: 0}
|
||||||
|
_freezeSfx: event:/Character/Freeze
|
||||||
--- !u!114 &13726836969441780
|
--- !u!114 &13726836969441780
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -98,7 +98,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &4125728165250223436
|
--- !u!4 &4125728165250223436
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -203,7 +203,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: 0.05885306
|
value: 0.058853067
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
|
@ -211,7 +211,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207112327334, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.z
|
propertyPath: m_LocalRotation.z
|
||||||
value: -0.22208732
|
value: -0.22208735
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207112327337, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207112327337, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_RenderPostProcessing
|
propertyPath: m_RenderPostProcessing
|
||||||
|
@ -235,15 +235,15 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: 0.000000013038514
|
value: -0.0000000018626449
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
value: -0.036978524
|
value: -0.036978554
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207311831624, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.z
|
propertyPath: m_LocalRotation.z
|
||||||
value: 0.018489273
|
value: 0.01848928
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
@ -263,7 +263,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: -0.000000016763806
|
value: -0.000000014901161
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207439169721, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
|
@ -339,7 +339,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207789115488, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207789115488, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: 0.05885307
|
value: 0.058853067
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207789115488, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207789115488, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
|
@ -391,7 +391,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: -0.0000000027939675
|
value: -0.0000000018626449
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
|
@ -399,7 +399,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344207849762652, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_LocalRotation.z
|
propertyPath: m_LocalRotation.z
|
||||||
value: -0.00000001117587
|
value: -0.0000000074505797
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5661344208280186838, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
- target: {fileID: 5661344208280186838, guid: dfbecbd9a563dba43be2d6139d9b3f90, type: 3}
|
||||||
propertyPath: m_XAxis.Value
|
propertyPath: m_XAxis.Value
|
||||||
|
@ -544,6 +544,10 @@ PrefabInstance:
|
||||||
propertyPath: _camera
|
propertyPath: _camera
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 4676633831388223340}
|
objectReference: {fileID: 4676633831388223340}
|
||||||
|
- target: {fileID: 13726836969441783, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3}
|
||||||
|
propertyPath: _freezeVfx
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 7557098150896029248}
|
||||||
- target: {fileID: 13726837176080779, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3}
|
- target: {fileID: 13726837176080779, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3}
|
||||||
propertyPath: _freeze
|
propertyPath: _freeze
|
||||||
value:
|
value:
|
||||||
|
|
|
@ -89,6 +89,13 @@ public class PlayerController : MonoBehaviour
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private string _freezeFirstUseDialogueKey;
|
private string _freezeFirstUseDialogueKey;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject _freezeVfx;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[FMODUnity.EventRef]
|
||||||
|
private string _freezeSfx;
|
||||||
|
|
||||||
private enum JumpState
|
private enum JumpState
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
|
@ -103,6 +110,7 @@ public class PlayerController : MonoBehaviour
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
_freezeVfx.SetActive( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color GetDebugColor()
|
private Color GetDebugColor()
|
||||||
|
@ -177,6 +185,8 @@ public class PlayerController : MonoBehaviour
|
||||||
{
|
{
|
||||||
_powers.Freeze.Consume();
|
_powers.Freeze.Consume();
|
||||||
objectTimeScale.Value = 0f;
|
objectTimeScale.Value = 0f;
|
||||||
|
_freezeVfx.SetActive( true );
|
||||||
|
FMODUnity.RuntimeManager.PlayOneShot( _freezeSfx );
|
||||||
Debug.Log( "[PlayerController] time frozen" );
|
Debug.Log( "[PlayerController] time frozen" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +194,7 @@ public class PlayerController : MonoBehaviour
|
||||||
{
|
{
|
||||||
UnfreezeTime();
|
UnfreezeTime();
|
||||||
_dialogueSystem.PlayLine( _freezeFirstUseDialogueKey, true );
|
_dialogueSystem.PlayLine( _freezeFirstUseDialogueKey, true );
|
||||||
|
_freezeVfx.SetActive( false );
|
||||||
Debug.Log( "[PlayerController] time unfrozen" );
|
Debug.Log( "[PlayerController] time unfrozen" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue