added artefact description writing

This commit is contained in:
cyndrdev 2021-04-16 16:26:42 +01:00
parent 1ef827968c
commit 9bb1b4e9df
8 changed files with 33 additions and 7 deletions

View File

@ -14,6 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_artefactID: 10 _artefactID: 10
_dialogueKey: PA_DASH _dialogueKey: PA_DASH
_descriptionKey: DESC_DASH
_name: Blink _name: Blink
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3} _prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}
_power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2} _power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2}

View File

@ -14,6 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_artefactID: 11 _artefactID: 11
_dialogueKey: PA_BOOST _dialogueKey: PA_BOOST
_descriptionKey: DESC_BOOST
_name: Boost _name: Boost
_prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3} _prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}
_power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2} _power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2}

View File

@ -13,6 +13,8 @@ MonoBehaviour:
m_Name: PA_Freeze m_Name: PA_Freeze
m_EditorClassIdentifier: m_EditorClassIdentifier:
_artefactID: 12 _artefactID: 12
_dialogueKey: _dialogueKey: PA_FREEZE
_descriptionKey: DESC_FREEZE
_name: Freeze _name: Freeze
_power: {fileID: 0} _prefab: {fileID: 3799998566341120319, guid: e48f46564bce92e4aa707fd447afd68e, type: 3}
_power: {fileID: 11400000, guid: 0cd9cf6494bb6f54d9b97631010d780e, type: 2}

View File

@ -151,7 +151,8 @@ MonoBehaviour:
_unlockedSfx: event:/Environment/Interactables/Artefact _unlockedSfx: event:/Environment/Interactables/Artefact
_unlockedSfxDelay: 0 _unlockedSfxDelay: 0
artefactUI: {fileID: 6808448285566310707} artefactUI: {fileID: 6808448285566310707}
artefactText: {fileID: 5377945582605113368} artefactTitle: {fileID: 5377945582605113368}
artefactDescription: {fileID: 1391585485005590035}
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}
@ -295,7 +296,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6729456937636341474, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3} - target: {fileID: 6729456937636341474, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7745116228229598630, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3} - target: {fileID: 7745116228229598630, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
propertyPath: m_Color.b propertyPath: m_Color.b
@ -356,6 +357,17 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 8488469911096441748, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3} m_CorrespondingSourceObject: {fileID: 8488469911096441748, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
m_PrefabInstance: {fileID: 225077497674743761} m_PrefabInstance: {fileID: 225077497674743761}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &1391585485005590035 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1175515826653966786, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}
m_PrefabInstance: {fileID: 225077497674743761}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3941142919679305061 stripped --- !u!1 &3941142919679305061 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 3868137226220198580, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3} m_CorrespondingSourceObject: {fileID: 3868137226220198580, guid: c2de9a6eb50967e4cbd6d654a8ecbcf1, type: 3}

View File

@ -60837,6 +60837,10 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 6808448285566310707, guid: 8a3f2b3b16275e540b349897292a42ac, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6808448287154422772, guid: 8a3f2b3b16275e540b349897292a42ac, type: 3} - target: {fileID: 6808448287154422772, guid: 8a3f2b3b16275e540b349897292a42ac, type: 3}
propertyPath: _preview propertyPath: _preview
value: value:

View File

@ -10,6 +10,9 @@ public class Artefact : ScriptableObject
public string dialogueKey => _dialogueKey; public string dialogueKey => _dialogueKey;
[SerializeField] private string _dialogueKey; [SerializeField] private string _dialogueKey;
public string descriptionKey => _descriptionKey;
[SerializeField] private string _descriptionKey;
public string Name => _name; public string Name => _name;
[SerializeField] private string _name; [SerializeField] private string _name;

View File

@ -42,7 +42,9 @@ public class PickUpDisplay : MonoBehaviour
private float _unlockedSfxDelay; private float _unlockedSfxDelay;
[SerializeField] private GameObject artefactUI; [SerializeField] private GameObject artefactUI;
[SerializeField] private TMP_Text artefactText; [FormerlySerializedAs( "artefactText" )]
[SerializeField] private TMP_Text artefactTitle;
[SerializeField] private TMP_Text artefactDescription;
[SerializeField] private DialogueSystem dialogue; [SerializeField] private DialogueSystem dialogue;
[SerializeField] private ArtefactSystem artefacts; [SerializeField] private ArtefactSystem artefacts;
[SerializeField] private ArtefactPreview _preview; [SerializeField] private ArtefactPreview _preview;
@ -69,7 +71,8 @@ public class PickUpDisplay : MonoBehaviour
private IEnumerator AnimateIn() private IEnumerator AnimateIn()
{ {
_uiOpen.Raise(); _uiOpen.Raise();
artefactText.text = _chosenArtefact.Name; artefactTitle.text = _chosenArtefact.Name;
artefactDescription.text = DialogueDatabase.ReadDialogue( _chosenArtefact.descriptionKey );
// inputSettings.updateMode = (InputSettings.UpdateMode)1; // inputSettings.updateMode = (InputSettings.UpdateMode)1;
_preview.Preview( _chosenArtefact.Prefab ); _preview.Preview( _chosenArtefact.Prefab );

View File

@ -137,7 +137,7 @@ public static partial class DialogueDatabase
continue; continue;
} }
_dict[key] = text; _dict[key] = text.Replace( "\\n", "\n" );
count++; count++;
} }