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
@@ -10,6 +10,7 @@ public class ConversationChangeEvent : UnityEvent<BaseAction> { }
public class ChoiceController : MonoBehaviour
{
public PlayerController playerController;
public KeyValuePair<string, BaseAction> _option;
public ConversationChangeEvent conversationChangeEvent;
// Update is called once per frame
@@ -41,6 +42,7 @@ public class ChoiceController : MonoBehaviour
public void MakeChoice()
{
playerController.TryBuyAction(_option.Value);
conversationChangeEvent.Invoke(_option.Value);
}
}