This commit is contained in:
cyndrdev 2021-04-16 13:15:54 +01:00
parent b40db21891
commit e9bcb45b41
2 changed files with 21 additions and 0 deletions

View File

@ -155,6 +155,7 @@ MonoBehaviour:
dialogue: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2} dialogue: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2}
artefacts: {fileID: 11400000, guid: f523ac0d77530064b8b41c627b13fae0, type: 2} artefacts: {fileID: 11400000, guid: f523ac0d77530064b8b41c627b13fae0, type: 2}
_preview: {fileID: 0} _preview: {fileID: 0}
_continueButton: {fileID: 3941142919679305063}
_uiOpen: {fileID: 11400000, guid: 0fc36e00903fc7047b48bb1844e6f12b, type: 2} _uiOpen: {fileID: 11400000, guid: 0fc36e00903fc7047b48bb1844e6f12b, type: 2}
_uiClose: {fileID: 11400000, guid: d8c4272694282b64e9cd1d4a42477262, type: 2} _uiClose: {fileID: 11400000, guid: d8c4272694282b64e9cd1d4a42477262, type: 2}
--- !u!225 &225077497674743764 --- !u!225 &225077497674743764
@ -360,6 +361,17 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 3868137226220198580, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3} m_CorrespondingSourceObject: {fileID: 3868137226220198580, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
m_PrefabInstance: {fileID: 225077497674743761} m_PrefabInstance: {fileID: 225077497674743761}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &3941142919679305063 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3868137226220198582, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
m_PrefabInstance: {fileID: 225077497674743761}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3941142919679305061}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &6808448286065587779 --- !u!1001 &6808448286065587779
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -47,6 +47,9 @@ public class PickUpDisplay : MonoBehaviour
[SerializeField] private ArtefactSystem artefacts; [SerializeField] private ArtefactSystem artefacts;
[SerializeField] private ArtefactPreview _preview; [SerializeField] private ArtefactPreview _preview;
[SerializeField]
private Button _continueButton;
[SerializeField] [SerializeField]
private GameEvent _uiOpen; private GameEvent _uiOpen;
@ -60,6 +63,7 @@ public class PickUpDisplay : MonoBehaviour
private void Start() private void Start()
{ {
EventHandler.current.onArtefactUI += PopUpOn; EventHandler.current.onArtefactUI += PopUpOn;
_continueButton.enabled = false;
} }
private IEnumerator AnimateIn() private IEnumerator AnimateIn()
@ -127,12 +131,17 @@ public class PickUpDisplay : MonoBehaviour
yield return null; yield return null;
} }
_continueButton.enabled = true;
_continueButton.Select();
} }
private IEnumerator AnimateOut() private IEnumerator AnimateOut()
{ {
yield return null; yield return null;
bool isComplete = false; bool isComplete = false;
_continueButton.enabled = false;
foreach ( var fader in _fadeInElements ) foreach ( var fader in _fadeInElements )
{ {