display player money, dialog when player have not enough money
This commit is contained in:
@@ -42,7 +42,20 @@ public class ChoiceController : MonoBehaviour
|
||||
|
||||
public void MakeChoice()
|
||||
{
|
||||
playerController.TryBuyAction(_option.Value);
|
||||
conversationChangeEvent.Invoke(_option.Value);
|
||||
if (playerController.TryBuyAction(_option.Value))
|
||||
{
|
||||
conversationChangeEvent.Invoke(_option.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
YesNoDialogUI.Instance.ShowQuestion("not enouth money",
|
||||
() =>
|
||||
{
|
||||
},
|
||||
() =>
|
||||
{
|
||||
//do nothing
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user