Files
SimUL/Assets/Scripts/InteractableObjects/OfficeTable.cs
T
Vova 1774ab5b18 refactor interact system
interact only after PopupItemMenu button clicked
2023-11-16 16:11:39 +02:00

21 lines
536 B
C#

using System;
using UnityEngine;
using static UnityEditor.Experimental.GraphView.GraphView;
public class OfficeTable : BaseInteractableObject
{
[SerializeField]
private JobsListSO _jobPositionsSO;
protected override void InteractAction()
{
UIManager.Instance.ShowJobSelectionDialog("Job agency", null, OnConfirm);
}
private void OnConfirm(JobInfoSO selectedJob)
{
_player.JobPosition = selectedJob.JobPosition;
print($"player selected position is {_player.JobPosition}");
}
}