Exemplo n.º 1
0
 public void ShowMessageWithOk(string dialogMessage, string okButton)
 {
     textSingle.text = dialogMessage;
     okButtonSingle.text = okButton;
     dialogueDelegate = DefualtOkButton;
     dialogue_PanelOk.gameObject.SetActive(true);
 }
Exemplo n.º 2
0
    public static void InitCanvases()
    {
        interactionOverrides = new Dictionary <string, Stack <UnityAction> >();
        traversers           = new List <DialogueTraverser>();
        NodeCanvasManager.FetchCanvasTypes();
        NodeTypes.FetchNodeTypes();
        ConnectionPortManager.FetchNodeConnectionDeclarations();

        if (Instance)
        {
            Instance.ClearCanvases();
        }

        var XMLImport = new XMLImportExport();

        if (Entity.OnEntitySpawn != null)
        {
            Entity.OnEntitySpawn += startDialogueGraph;
        }
        else
        {
            Entity.OnEntitySpawn = startDialogueGraph;
        }

        OnDialogueCancel = null;
        OnDialogueEnd    = null;
        StartDialogueNode.dialogueCanvasNode = null;
        StartDialogueNode.missionCanvasNode  = null;
        initialized = true;
    }
Exemplo n.º 3
0
 public DialogueUnit(string content, DialogueKind kind = DialogueKind.Talk, DialogueDelegate OnDialogueEnd = null, Sprite cg = null)
 {
     this.content       = content;
     this.kind          = kind;
     this.cg            = cg;
     this.OnDialogueEnd = OnDialogueEnd;
 }
Exemplo n.º 4
0
 public void ShowMessageWithOkCancel(string dialogMessage, string okButton, string cancelButton, DialogueDelegate onClickOK)
 {
     textDuo.text = dialogMessage;
     okButtonDuo.text = okButton;
     cancelButtonDuo.text = cancelButton;
     dialogueDelegate = onClickOK;
     dialogue_PanelOkCancel.gameObject.SetActive(true);
 }
Exemplo n.º 5
0
 public void OnClickCancelDuo()
 {
     dialogue_PanelOkCancel.gameObject.SetActive(false);
     dialogueDelegate = null;
     if(dialogueDelegateCancel != null)
     dialogueDelegateCancel();
     Time.timeScale = 1.0f;
 }