added implementation for freeze first use dialogue

This commit is contained in:
cyndrdev 2021-04-16 14:06:52 +01:00
parent cf8d58690d
commit 116b1140df
2 changed files with 9 additions and 0 deletions

View File

@ -169,6 +169,8 @@ MonoBehaviour:
_exhaustedColor: {r: 1, g: 0, b: 0, a: 0} _exhaustedColor: {r: 1, g: 0, b: 0, a: 0}
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2} objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
frozenTime: {fileID: 11400000, guid: 19273ba4ac237ab4381926cfb195dda8, type: 2} frozenTime: {fileID: 11400000, guid: 19273ba4ac237ab4381926cfb195dda8, type: 2}
_dialogueSystem: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2}
_freezeFirstUseDialogueKey: SD_FREEZE_0
--- !u!114 &13726836969441780 --- !u!114 &13726836969441780
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -82,6 +82,12 @@ public class PlayerController : MonoBehaviour
[SerializeField] [SerializeField]
private SerialFloat frozenTime; private SerialFloat frozenTime;
[SerializeField]
private DialogueSystem _dialogueSystem;
[SerializeField]
private string _freezeFirstUseDialogueKey;
private enum JumpState private enum JumpState
{ {
@ -177,6 +183,7 @@ public class PlayerController : MonoBehaviour
if ( _powers.Freeze.timeSinceConsume > frozenTime && TimeIsFrozen ) if ( _powers.Freeze.timeSinceConsume > frozenTime && TimeIsFrozen )
{ {
UnfreezeTime(); UnfreezeTime();
_dialogueSystem.PlayLine( _freezeFirstUseDialogueKey, true );
Debug.Log( "[PlayerController] time unfrozen" ); Debug.Log( "[PlayerController] time unfrozen" );
} }