Options Dialog refactor for more generic
This commit is contained in:
@@ -3,8 +3,9 @@ using UnityEngine;
|
||||
public class OfficeTable : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private JobsListSO _jobPositionsSO;
|
||||
|
||||
private DialogCategorySO _dialogOptionsSO;
|
||||
[SerializeField]
|
||||
private DialogSO _dialogSO;
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Talk].IsEnabled = true;
|
||||
@@ -12,7 +13,7 @@ public class OfficeTable : BaseInteractableObject
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
GameManager.Instance.UI.ShowJobSelectionDialog("Job agency", null, OnConfirm);
|
||||
GameManager.Instance.UI.ShowTabObtionsDialog(_dialogSO, null, OnConfirm);
|
||||
}
|
||||
|
||||
private void OnConfirm(JobInfoSO selectedJob)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Assets.Scripts.Interfaces;
|
||||
using UnityEngine;
|
||||
|
||||
public class SecretaryDesk : BaseInteractableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private DialogSO _dialogSO;
|
||||
[SerializeField]
|
||||
private DialogCategorySO _dialogOptionsSO;
|
||||
|
||||
protected override void PrepareMenuActions()
|
||||
{
|
||||
_menuActions[RadialMenuActions.Talk].IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void InteractAction(RadialMenuActions interactAction)
|
||||
{
|
||||
GameManager.Instance.UI.ShowTabObtionsDialog(_dialogSO, null, OnConfirm);
|
||||
}
|
||||
|
||||
private void OnConfirm(IDialogOption selectedOption)
|
||||
{
|
||||
//_player.JobPosition = (selectedOption as EducationInfoSO).JobPosition;
|
||||
print($"player selected position is {_player.JobPosition}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05e7f5c95d24c174ba832e4264e9d224
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user