33 lines
833 B
C#
33 lines
833 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
public class MyserverTest : MonoBehaviour
|
|
{
|
|
public static MyserverTest instance;
|
|
public Text text;
|
|
|
|
private void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
MyServer.instance.SetHandler_szr(Fun);
|
|
MyServer.instance.SetHandler_jqr(Fun);
|
|
MyServer.instance.SetHandler_wrj(Fun);
|
|
MyServer.instance.SetHandler_other(Fun);
|
|
}
|
|
|
|
private void Fun(JObject jb)
|
|
{
|
|
Debug.Log(jb.ToString());
|
|
string commond = jb["commond"].ToString();
|
|
MyServer.instance.SendMsgToSDK(JsonConvert.SerializeObject(new { eventid = jb["eventid"].ToObject<int>(), result = ResultStatus.SUCCESS }));
|
|
}
|
|
}
|