start to change action system

This commit is contained in:
Vladimir Koshevarov
2022-08-18 16:07:06 +03:00
parent a9e1db4ac2
commit 9366aa479c
11 changed files with 31 additions and 49 deletions
@@ -11,16 +11,14 @@ public class ConversationController : MonoBehaviour
public TextMeshProUGUI _title;
[SerializeField]
public Button _choiceButton;
[SerializeField]
private Button _closeBtn;
public ConversationChangeEvent conversationChangeEvent;
private List<ChoiceController> choiceControllers = new();
public static ConversationController Instance { get; private set; }
private void Awake()
{
Instance = this;
Hide();
}
@@ -35,17 +33,14 @@ public class ConversationController : MonoBehaviour
ChoiceController c = ChoiceController.AddChoiceButton(_choiceButton, options.ElementAt(count), count);
choiceControllers.Add(c);
}
_closeBtn.onClick.AddListener(() =>
{
Hide();
});
StopAllCoroutines();
Time.timeScale = 0;
_choiceButton.gameObject.SetActive(false);
}
private void RemoveChoices()
{
foreach (ChoiceController c in choiceControllers)