Ejemplo n.º 1
0
    public void SetComment(GlyphComment comment, Glyph glyph)
    {
        parentGlyph  = glyph;
        this.comment = comment;

        RepopulateUI();
    }
Ejemplo n.º 2
0
    public override bool Equals(Object obj)
    {
        if (obj == null)
        {
            return(false);
        }

        if (obj is GlyphComment)
        {
            GlyphComment otherComment = (GlyphComment)obj;
            return(this.commentId == otherComment.commentId);
        }

        return(false);
    }
Ejemplo n.º 3
0
    public IEnumerator DeleteCommentFromGlyph(Glyph glyph, GlyphComment comment)
    {
        Debug.Log("Deleting comment " + comment.GetCommentId());

        Dictionary <string, string> data = new Dictionary <string, string>();

        data ["glyphid"]     = "" + glyph.GetGlyphId();
        data ["userComment"] = "" + comment.GetCommentId();

        ServerCall waitFor = new ServerCall(INSTANCE.SendServerInformationRequest(DELETE_COMMENT_FROM_GLYPH, data));

        yield return(StartCoroutine(waitFor.call()));

        string infoText = waitFor.Response;

        Debug.Log("Received " + infoText);

        yield return("Success!");
    }
Ejemplo n.º 4
0
    public IEnumerator AddCommentToGlyph(Glyph glyph, string commentText)
    {
        Debug.Log("Adding comment to glyph");

        Dictionary <string, string> data = new Dictionary <string, string>();

        data ["glyphid"]     = "" + glyph.GetGlyphId();
        data ["userComment"] = commentText;

        ServerCall waitFor = new ServerCall(INSTANCE.SendServerInformationRequest(ADD_COMMENT_TO_GLYPH, data));

        yield return(StartCoroutine(waitFor.call()));

        string infoText = waitFor.Response;

        Debug.Log("Received " + infoText);

        GlyphComment comment = JsonUtility.FromJson <GlyphComment> (infoText);

        yield return(comment);
    }