친구에게 Item 선물을 보내는 Method

Namespace: Matrix.Component
Assembly: MatrixGames (in MatrixGames.dll)

void SendGift( 
string friendID
Callback<SendGiftResponse> cb 
)
This language is not supported or no code example is available.

Parameters

friendID

Type: string

친구 ID.

cb

Type: Callback<SendGiftResponse>

Callback function

Return Value

  • On Successful -

    cb.result: 0.

    cb.cause: "OK"

    cb.response: Response Data SendGiftResponse

  • On Error -

    cb.result: 0가 아닌 integer 값

    cb.cause: 상세 에러 메세지

친구에게 Item 선물을 보내는 Method
  using UnityEngine;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using Matrix;
 
 static void onGiftSendGiftTest( Matrix.CallbackInfo<Matrix.Domain.Gift.SendGiftResponse> info )
 {
     Debug.Log( "onGiftSendGiftTest Called" );
     Debug.Log("result: " + info.result);
 
     if (info.result == 0)
     {
 	    string message = info.response.StructToJson();
 	
 	    Debug.Log(message);
     }
 }
 
 static void GiftSendGiftTest()
 {
     IMatrix API = MatrixManager.Instance;
 
     string friendID = "89682041219385073";
     Debug.Log( "[GiftSendGiftTest]" );
 
     API.Gift.SendGift(friendID, onGiftSendGiftTest);
 }
 	
  					

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0