게임 Play종료

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

void EndPlay( 
PlayResult playResult
Callback<EndPlayResponse> cb 
)
This language is not supported or no code example is available.

Parameters

playResult

Type: PlayResult

게임 결과 기록 ref. PlayResult

cb

Type: Callback<EndPlayResponse>

Callback function

Return Value

  • On Successful -

    cb.result: 0.

    cb.cause: "OK"

    cb.response: Response Data ref. EndPlayResponse

  • On Error -

    cb.result: 0가 아닌 integer 값

    cb.cause: 상세 에러 메세지

게임 종료시 호출

게임 play 결과가 achievement를 달성할 경우 Reward를 해 주기 위해 사용.

	
  using UnityEngine;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using Matrix;
 
  static void onUserEndPlayTest(Matrix.CallbackInfo<Matrix.Domain.User.EndPlayResponse> info)
  {
      Debug.Log("onUserEndPlayTest Called");
      Debug.Log("result: " + info.result);
 
      if (info.result == 0)
      {
          string message = info.response.StructToJson();
 
          Debug.Log(message);
      }
  }
 
  static void UserEndPlayTest()
  {
      IMatrix API = MatrixManager.Instance;
      Debug.Log("[UserEndPlayTest]");
      Matrix.Domain.User.PlayResult playResult = new Matrix.Domain.User.PlayResult();
 
      playResult.exp = 100;
      playResult.coin = 500;
      playResult.score = 1000;
      playResult.score1 = 0;
      playResult.coinScore = 500;
      playResult.score2 = 0;
      playResult.score3 = 0;
      playResult.getRandomBox = 5;
 
      API.User.EndPlay(playResult, onUserEndPlay);
  }
 					

.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