protected virtual void Awake() { _uiDispatcher = GameInstance.CurrentInstance.GetUIMessageDispatcher(); _dialogueMappings = DialogueData.GenerateDialogueMappings(DialogueEntries); _currentData = new CompanionData { Image = CompanionUIIcon, CompanionPrefabReference = CompanionAssetReference, PowerCooldown = GetCompanionPowerCooldown(), PowerUseCount = MaxPowerCharges }; }
public void GenerateDialogueMappings_ConvertsAsExpected() { var entry1 = new DialogueEntry { DialogueEntryKey = "Key" }; var entry2 = new DialogueEntry { DialogueEntryKey = "OtherKey" }; var data = ScriptableObject.CreateInstance <DialogueData>(); data.DialogueEntries = new List <DialogueEntry> { entry1, entry2 }; var mappings = DialogueData.GenerateDialogueMappings(data); Assert.AreSame(entry1, mappings[entry1.DialogueEntryKey]); Assert.AreSame(entry2, mappings[entry2.DialogueEntryKey]); }