private void step1SaveStorable() { storable = new NRawMessage(); storable.setContent("this is the RawMessage content"); sampleIO.log("Step 1 : Saving Storable "); gameApi.saveStorableRequest(storable, nameSpace, (SaveStorableResponse response)=> { if (response.getSaveStorableStatus() == SaveStorableStatus.SUCCESS) { sampleIO.log("Step 1 : Save storable successfull\r\n"); step2FindStorables(); } else { sampleIO.log("Step 1 : Fail to update storable\r\n"); onExit(); } }); }
private void invite() { NInvitation invitation = new NInvitation(); NRawMessage nRawMessage = new NRawMessage(); nRawMessage.setContent("Invitation message of choice"); invitation.setContent(nRawMessage); gameApi.invitePlayerRequest("player id to invite", invitation, (InvitePlayerResponse invitePlayerResponse)=> { InvitePlayerStatus invitePlayerStatus = invitePlayerResponse.getInvitePlayerStatus(); if (invitePlayerStatus == InvitePlayerStatus.SUCCESS) { sampleIO.log("Invitation sent"); } else { sampleIO.log("Invitation failed" + invitePlayerStatus.ToString()); } }); }