Example #1
0
    public string sendDialogData(int who, string dialog)
    {
        dialogText.text = dialog; // show the dialog text on a Screen
        DAJson dataJson = new DAJson();

        dataJson.data = dialog;
        dialog        = JsonUtility.ToJson(dataJson);
        switch (who)
        {
        case 1:    //SARA
        {
            IdentityPoolId = IdentityPoolId_Sara;
            Invoke(chatSara, dialog);
            break;
        }

        case 2:    //Alex
        {
            IdentityPoolId = IdentityPoolId_Alex;
            Invoke(chatAlex, dialog);
            break;
        }

        default:
        {
            IdentityPoolId = "";
            break;
        }
        }

        return(dialog);
    }
Example #2
0
 //------------------------------------------------- mono behavior ---------------------------------------------//
 #region Awake
 private void Awake()
 {
     reply = new DAJson();
     UnityInitializer.AttachToGameObject(this.gameObject);
 }