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

        if (obj is SharedWithUserGlyphEvent)
        {
            SharedWithUserGlyphEvent otherShare = (SharedWithUserGlyphEvent)obj;
            return(this.sharedGlyph.Equals(otherShare.sharedGlyph));
        }

        return(false);
    }
Exemplo n.º 2
0
    public IEnumerator StartSharingGlyph(Glyph glyph, User user)
    {
        Debug.Log("Starting to share glyph with user: "******" " + user.GetUserId());

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

        data ["glyphid"]        = "" + glyph.GetGlyphId();
        data ["usersharedwith"] = user.GetUserId();

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

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

        string infoText = waitFor.Response;

        Debug.Log("Received " + infoText);

        SharedWithUserGlyphEvent share = JsonUtility.FromJson <SharedWithUserGlyphEvent>(infoText);

        yield return(share);
    }