question with multiple choise system
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using Assets.Scripts.Actions;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
public class TestingQuestionDialog : MonoBehaviour
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
YesNoDialogUI.Instance.ShowQuestion("To be or not to be ?",
|
||||
() =>
|
||||
{
|
||||
Application.Quit();
|
||||
EditorApplication.ExitPlaymode();
|
||||
},
|
||||
() =>
|
||||
{
|
||||
//do nothing
|
||||
});
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
Dictionary<string, BaseAction> optionsList = new Dictionary<string, BaseAction>
|
||||
{
|
||||
{ "Hamburgers - 83$", new Eat(null, 6, 1, 83) },
|
||||
{ "Cheesburger - 94$", new Eat(null, 6, 1, 94) },
|
||||
{ "Astro chicken - 131$", new Eat(null, 6, 1, 131) },
|
||||
{ "Fries - 68$", new Eat(null, 6, 1, 68) },
|
||||
{ "Shakes - 108$", new Eat(null, 6, 1, 108) },
|
||||
{ "Colas - 73$", new Eat(null, 6, 1, 73) }
|
||||
};
|
||||
ConversationController.Instance.Change("Monolith burger", optionsList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user