public void SetComment(GlyphComment comment, Glyph glyph) { parentGlyph = glyph; this.comment = comment; RepopulateUI(); }
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); }
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!"); }
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); }