chicken_dy/Assets/WX-WASM-SDK/WXLaunchProgress.cs

27 lines
749 B
C#
Raw Normal View History

2022-08-01 03:47:37 +00:00
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System;
namespace WeChatWASM {
public class LaunchProgressParams {
public string callbackId;
public string res;
}
public class WXLaunchEventListener {
#if UNITY_WEBGL
[DllImport("__Internal")]
#endif
private static extern string WXOnLaunchProgress();
public Action<LaunchEvent> OnLaunchProgressAction;
public static Dictionary<string, WXLaunchEventListener> Dict = new Dictionary<string, WXLaunchEventListener>();
public WXLaunchEventListener(Action<LaunchEvent> action) {
var id = WXOnLaunchProgress();
Dict.Add(id, this);
OnLaunchProgressAction+=action;
}
}
2022-07-27 13:57:29 +00:00
}