게임 Play Start

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

void StartPlay( 
List<string> skillList
Callback<StartPlayResponse> cb 
)
This language is not supported or no code example is available.

Parameters

skillList

Type: List<string>

게임 시작시 사용할 Item. 사용할 skill id에 대한 리스트. ex) "SK1", "SK2"

cb

Type: Callback<StartPlayResponse>

Callback function

Return Value

  • On Successful -

    cb.result: 0.

    cb.cause: "OK"

    cb.response: Response Data ref. StartPlayResponse

  • On Error -

    cb.result: 0가 아닌 integer 값

    cb.cause: 상세 에러 메세지

게임 시작시 호출

Game Play에 따른 item이나 user info의 변동이 있는 게임의 경우에 사용

	
  using UnityEngine;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using Matrix;
 
  static void onUserStartPlay(Matrix.CallbackInfo<Matrix.Domain.User.StartPlayResponse> info)
  {
      Debug.Log("onUserStartPlay Called");
      Debug.Log("result: " + info.result);
 
      if (info.result == 0)
      {
          string message = info.response.StructToJson();
 
          Debug.Log(message);
      }
  }
 
  static void UserStartPlayTest()
  {
      IMatrix API = MatrixManager.Instance;
      List<string> skillList = new List<string> ();
 
      Debug.Log("[UserStartPlayTest]");
      skillList.Add ("SK1");
      skillList.Add ("SK2");
      API.User.StartPlay(skillList, onUserStartPlay);
  }
 					

.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